Class SimpleDirectoryPersistentCache

  • All Implemented Interfaces:
    EntityCapsPersistentCache

    public class SimpleDirectoryPersistentCache
    extends java.lang.Object
    implements EntityCapsPersistentCache
    Simple implementation of an EntityCapsPersistentCache that uses a directory to store the Caps information for every known node. Every node is represented by a file.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleDirectoryPersistentCache​(java.io.File cacheDir)
      Creates a new SimpleDirectoryPersistentCache Object.
      SimpleDirectoryPersistentCache​(java.io.File cacheDir, org.jivesoftware.smack.util.stringencoder.StringEncoder<java.lang.String> filenameEncoder)
      Creates a new SimpleDirectoryPersistentCache Object.
    • Constructor Detail

      • SimpleDirectoryPersistentCache

        public SimpleDirectoryPersistentCache​(java.io.File cacheDir)
        Creates a new SimpleDirectoryPersistentCache Object. Make sure that the cacheDir exists and that it's an directory.

        Default filename encoder Base32, as this will work on all file systems, both case sensitive and case insensitive. It does however produce longer filenames.

        Parameters:
        cacheDir - TODO javadoc me please
      • SimpleDirectoryPersistentCache

        public SimpleDirectoryPersistentCache​(java.io.File cacheDir,
                                              org.jivesoftware.smack.util.stringencoder.StringEncoder<java.lang.String> filenameEncoder)
        Creates a new SimpleDirectoryPersistentCache Object. Make sure that the cacheDir exists and that it's an directory. If your cacheDir is case insensitive then make sure to set the StringEncoder to Base32 (which is the default).
        Parameters:
        cacheDir - The directory where the cache will be stored.
        filenameEncoder - Encodes the node string into a filename.