Spring Integration

org.springframework.integration.store
Class PropertiesPersistingMetadataStore

java.lang.Object
  extended by org.springframework.integration.store.PropertiesPersistingMetadataStore
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, MetadataStore

public class PropertiesPersistingMetadataStore
extends java.lang.Object
implements MetadataStore, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

Properties file-based implementation of MetadataStore. To avoid conflicts each instance should be constructed with the unique key from which unique file name will be generated. The file name will be 'persistentKey' + ".last.entry". Files will be written to the 'java.io.tmpdir' + "/spring-integration/".

Since:
2.0
Author:
Oleg Zhurakousky, Mark Fisher

Constructor Summary
PropertiesPersistingMetadataStore()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 java.lang.String get(java.lang.String key)
          Reads a value for the given key from this MetadataStore.
 void put(java.lang.String key, java.lang.String value)
          Writes a key value pair to this MetadataStore.
 void setBaseDirectory(java.lang.String baseDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesPersistingMetadataStore

public PropertiesPersistingMetadataStore()
Method Detail

setBaseDirectory

public void setBaseDirectory(java.lang.String baseDirectory)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

put

public void put(java.lang.String key,
                java.lang.String value)
Description copied from interface: MetadataStore
Writes a key value pair to this MetadataStore.

Specified by:
put in interface MetadataStore

get

public java.lang.String get(java.lang.String key)
Description copied from interface: MetadataStore
Reads a value for the given key from this MetadataStore.

Specified by:
get in interface MetadataStore

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception

Spring Integration