Class MemcachedStorageCapabilities
- java.lang.Object
-
- org.opensaml.storage.impl.memcached.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-Iflag.MemcachedStorageServicesupports arbitrarily large context names and keys by hashing values longer than 250 bytes, which is the maximum size allowed.
-
-
Field Summary
Fields Modifier and Type Field Description private static longdefaultMaxValueMemcached supports 1M slabs (i.e.private longvalueSizeMaximum size of memcached values.
-
Constructor Summary
Constructors Constructor Description MemcachedStorageCapabilities()Constructor.MemcachedStorageCapabilities(long maxValueSize)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetContextSize()Gets max size of context labels in characters.intgetKeySize()Gets max size of keys in characters.longgetValueSize()Gets max size of values in characters.booleanisClustered()Returns true iff the storage implementation manages data independent of a single server node.booleanisServerSide()Returns true iff the storage implementation manages data independent of the client.
-
-
-
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:
getContextSizein interfaceStorageCapabilities- Returns:
- max size of context labels in characters
-
getKeySize
public int getKeySize()
Gets max size of keys in characters.- Specified by:
getKeySizein interfaceStorageCapabilities- Returns:
- max size of keys in characters
-
getValueSize
public long getValueSize()
Gets max size of values in characters.- Specified by:
getValueSizein interfaceStorageCapabilities- 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:
isServerSidein interfaceStorageCapabilitiesEx- 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:
isClusteredin interfaceStorageCapabilitiesEx- Returns:
- true iff the storage implementation manages data independent of a single server node
-
-