Class StoreMetadataValueService

  • All Implemented Interfaces:
    AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, MessageEventGenerator, Service, StateManagedComponent

    @ComponentProfile(summary="Store metadata values ready for checking by check-metadata-value-service",
                      tag="service,duplicate")
    public class StoreMetadataValueService
    extends DuplicateMetadataValueService

    Service implementation which stores the value held against a configured metadata key in a persistent list, generally for use by CheckMetadataValueService. If the configured key returns null or empty, a ServiceException is thrown. The underlying store may contain duplicate values.

    The store of previous values has a configurable maximum size. After a new value is added, if the store exceeds the maximum size the oldest value is removed. The store is then persisted.

    Storage will be spun off into a separate interface and imps if required.

    In the adapter configuration file this class is aliased as store-metadata-value-service which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • StoreMetadataValueService

        public StoreMetadataValueService()

        Creates a new instance. Default history size is 1000.

    • Method Detail

      • getNumberOfPreviousValuesToStore

        public int getNumberOfPreviousValuesToStore()

        Returns the number of previous values to keep.

        Returns:
        the number of previous values to keep
      • setNumberOfPreviousValuesToStore

        public void setNumberOfPreviousValuesToStore​(int i)

        Sets the number of previous values to keep. Must be greater than 0.

        Parameters:
        i - the number of previous values to keep