INT-3721: Add Flush Support to Persistent Filters

JIRA: https://jira.spring.io/browse/INT-3721

Support flushing metadata after each update.

Polishing JavaDocs
This commit is contained in:
Gary Russell
2015-05-22 12:38:11 -04:00
committed by Artem Bilan
parent 510bea55cd
commit 5b0b3fc159
7 changed files with 133 additions and 5 deletions

View File

@@ -37,6 +37,9 @@ This filter matches on the filename and modified time.
Since _version 4.0_, this filter requires a `ConcurrentMetadataStore`.
When used with a shared data store (such as `Redis` with the `RedisMetadataStore`) this allows filter keys to be shared across multiple application instances, or when a network file share is being used by multiple servers.
Since __version 4.1.5__, this filter has a new property `flushOnUpdate` which will cause it to flush the
metadata store on every update (if the store implements `Flushable`).
=====
[source,xml]

View File

@@ -180,6 +180,9 @@ Use the `local-filter` attribute to configure the behavior of the local file sys
To solve these particular use cases, you can use a`FileSystemPersistentAcceptOnceFileListFilter` as a local filter instead.
This filter also stores the accepted file names and modified timestamp in an instance of the`MetadataStore` strategy (<<metadata-store>>), and will detect the change in the local file modified time.
Since __version 4.1.5__, these filters have a new property `flushOnUpdate` which will cause them to flush the
metadata store on every update (if the store implements `Flushable`).
IMPORTANT: Further, if you use a distributed `MetadataStore` (such as <<redis-metadata-store>> or <<gemfire-metadata-store>>) you can have multiple instances of the same adapter/application and be sure that one and only one will process a file.
The actual local filter is a `CompositeFileListFilter` containing the supplied filter and a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`); files are downloaded with this suffix (default: `.writing`) and the file is renamed to its final name when the transfer is complete, making it 'visible' to the filter.

View File

@@ -22,6 +22,9 @@ the framework:
The `PropertiesPersistingMetadataStore` is backed by a properties file and a http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/PropertiesPersister.html[PropertiesPersister].
By default, it only persists the state when the application context is closed normally. It implements `Flushable` so you
can persist the state at will, be invoking `flush()`.
[source,xml]
----
<bean id="metadataStore"

View File

@@ -266,6 +266,9 @@ Use the `local-filter` attribute to configure the behavior of the local file sys
To solve these particular use cases, you can use a`FileSystemPersistentAcceptOnceFileListFilter` as a local filter instead.
This filter also stores the accepted file names and modified timestamp in an instance of the`MetadataStore` strategy (<<metadata-store>>), and will detect the change in the local file modified time.
Since __version 4.1.5__, these filters have a new property `flushOnUpdate` which will cause them to flush the
metadata store on every update (if the store implements `Flushable`).
IMPORTANT: Further, if you use a distributed `MetadataStore` (such as <<redis-metadata-store>> or <<gemfire-metadata-store>>) you can have multiple instances of the same adapter/application and be sure that one and only one will process a file.
The actual local filter is a `CompositeFileListFilter` containing the supplied filter and a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`); files are downloaded with this suffix (default: `.writing`) and the file is renamed to its final name when the transfer is complete, making it 'visible' to the filter.

View File

@@ -109,7 +109,7 @@ attributes with similar purpose as for `<int-amqp:outbound-channel-adapter>`.
See <<amqp>> for more information.
[[x4.2-xpath-splitter]]
==== XPath Splitter improvements
==== XPath Splitter Improvements
The `XPathMessageSplitter` (`<int-xml:xpath-splitter>`) now allows the configuration of `output-properties`
for the internal `javax.xml.transform.Transformer` and supports an `Iterator` mode (defaults to `true`) for the xpath
@@ -118,9 +118,15 @@ evaluation `org.w3c.dom.NodeList` result.
See <<xml-xpath-splitting>> for more information.
[[x4.2-http-changes]]
==== HTTP changes
==== HTTP Changes
The HTTP Inbound Endpoints (`<int-http:inbound-channel-adapter>` and `<int-http:inbound-gateway>`) now allow the
configuration of _Cross-Origin Resource Sharing (CORS)_.
See <<cors>> for more information.
[[x4.2-file-filter]]
==== Persistent File List Filter Changes
The `AbstractPersistentFileListFilter` has a new property `flushOnUpdate` which, when set to true, will `flush()` the
metadata store if it implements `Flushable` (e.g. the `PropertiesPersistenMetadataStore`).