Package org.opensaml.storage.impl.memcached

# Class MemcachedStorageCapabilities

java.lang.Object
org.opensaml.storage.impl.memcached.MemcachedStorageCapabilities

All Implemented Interfaces:
  `StorageCapabilities`

public class MemcachedStorageCapabilities extends Object implements StorageCapabilities
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 Summary

Fields
Modifier and Type
Field
Description
`private static long`
`defaultMaxValue`
Memcached supports 1M slabs (i.e.
`private final long`
`valueSize`
Maximum size of memcached values.

## Constructor Summary

Constructors
Constructor
Description
`MemcachedStorageCapabilities()`
Constructor.
`MemcachedStorageCapabilities(long maxValueSize)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`int`
`getContextSize()`
Gets max size of context labels in characters.
`int`
`getKeySize()`
Gets max size of keys in characters.
`long`
`getValueSize()`
Gets max size of values in characters.
`boolean`
`isClustered()`
Returns true iff the storage implementation manages data independent of a single server node.
`boolean`
`isServerSide()`
Returns true iff the storage implementation manages data independent of the client.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### 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 Details

### MemcachedStorageCapabilities

public MemcachedStorageCapabilities()
Constructor.

### MemcachedStorageCapabilities

public MemcachedStorageCapabilities(@Positive long maxValueSize)
Constructor.

Parameters:
  `maxValueSize` - maximum value size

## Method Details

### 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 `StorageCapabilities`
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 `StorageCapabilities`
Returns:
  true iff the storage implementation manages data independent of a single server node