Class FSProvider<T extends FileStore>

  • All Implemented Interfaces:
    CfgEventListener, EventListener, javax.inject.Provider<T>
    Direct Known Subclasses:
    ClientFSStoreProvider

    public abstract class FSProvider<T extends FileStore>
    extends TypedProvider<T>
    Creates Filestores. This centralizes all the general checking to create these. Specific providers are needed for specific store types. NOTE If the configuration only supplies a single path, then this will create the storage and index path automatically and will add the component of the TypedProvider.getTarget() (e.g. "clientApprovals") to the path).

    Created by Jeff Gaynor
    on 1/10/12 at 2:11 PM

    • Constructor Detail

      • FSProvider

        public FSProvider​(org.apache.commons.configuration.tree.ConfigurationNode config,
                          String type,
                          String target,
                          MapConverter converter)
    • Method Detail

      • isRemoveEmptyFiles

        public boolean isRemoveEmptyFiles()
      • isRemoveFailedFiles

        public boolean isRemoveFailedFiles()
      • componentFound

        public Object componentFound​(CfgEvent configurationEvent)
      • produce

        protected abstract T produce​(File dataPath,
                                     File indexPath,
                                     boolean removeEmptyFiles,
                                     boolean removeFailedFiles)
        Put the actual instantiation of the store here. get() does the grunt work of getting everything out of the configuration for you and checking that it all works as planned.
        Parameters:
        dataPath -
        indexPath -
        Returns:
      • setUpkeepConfiguration

        public void setUpkeepConfiguration​(UpkeepConfiguration upkeepConfiguration)