Class MemcachedStorageCapabilities

  • All Implemented Interfaces:
    StorageCapabilities, StorageCapabilitiesEx

    public class MemcachedStorageCapabilities
    extends Object
    implements StorageCapabilitiesEx
    Provides a description of memcached capabilities. Note that only value size is configurable since memcached supports increasing the maximum slab size via the -I flag. MemcachedStorageService supports arbitrarily large context names and keys by hashing values longer than 250 bytes, which is the maximum size allowed.
    • Field Detail

      • defaultMaxValue

        private static long defaultMaxValue
        Memcached supports 1M slabs (i.e. values) by default and issues warning on increase.
      • valueSize

        @Positive
        private final long valueSize
        Maximum size of memcached values.
    • Constructor Detail

      • MemcachedStorageCapabilities

        public MemcachedStorageCapabilities()
        Constructor.
      • MemcachedStorageCapabilities

        public MemcachedStorageCapabilities​(@Positive
                                            long maxValueSize)
        Constructor.
        Parameters:
        maxValueSize - maximum value size
    • Method Detail

      • getContextSize

        public int getContextSize()
        Gets max size of context labels in characters.
        Specified by:
        getContextSize in interface StorageCapabilities
        Returns:
        max size of context labels in characters
      • getKeySize

        public int getKeySize()
        Gets max size of keys in characters.
        Specified by:
        getKeySize in interface StorageCapabilities
        Returns:
        max size of keys in characters
      • getValueSize

        public long getValueSize()
        Gets max size of values in characters.
        Specified by:
        getValueSize in interface StorageCapabilities
        Returns:
        max size of values in characters
      • isServerSide

        public boolean isServerSide()
        Returns true iff the storage implementation manages data independent of the client.
        Specified by:
        isServerSide in interface StorageCapabilitiesEx
        Returns:
        true iff the storage implementation manages data independent of the client
      • isClustered

        public boolean isClustered()
        Returns true iff the storage implementation manages data independent of a single server node.
        Specified by:
        isClustered in interface StorageCapabilitiesEx
        Returns:
        true iff the storage implementation manages data independent of a single server node