#include <xmltooling/util/StorageService.h>
Public Member Functions | |
virtual const Capabilities & | getCapabilities () const |
Returns the capabilities of the underlying service. | |
virtual bool | createString (const char *context, const char *key, const char *value, time_t expiration)=0 |
Creates a new "short" record in the storage service. | |
virtual int | readString (const char *context, const char *key, std::string *pvalue=0, time_t *pexpiration=0, int version=0)=0 |
Returns an existing "short" record from the storage service. | |
virtual int | updateString (const char *context, const char *key, const char *value=0, time_t expiration=0, int version=0)=0 |
Updates an existing "short" record in the storage service. | |
virtual bool | deleteString (const char *context, const char *key)=0 |
Deletes an existing "short" record from the storage service. | |
virtual bool | createText (const char *context, const char *key, const char *value, time_t expiration)=0 |
Creates a new "long" record in the storage service. | |
virtual int | readText (const char *context, const char *key, std::string *pvalue=0, time_t *pexpiration=0, int version=0)=0 |
Returns an existing "long" record from the storage service. | |
virtual int | updateText (const char *context, const char *key, const char *value=0, time_t expiration=0, int version=0)=0 |
Updates an existing "long" record in the storage service. | |
virtual bool | deleteText (const char *context, const char *key)=0 |
Deletes an existing "long" record from the storage service. | |
virtual void | reap (const char *context)=0 |
Manually trigger a cleanup of expired records. | |
virtual void | updateContext (const char *context, time_t expiration)=0 |
Updates the expiration time of all records in the context. | |
virtual void | deleteContext (const char *context)=0 |
Forcibly removes all records in a given context along with any associated resources devoted to maintaining the context. | |
Classes | |
class | Capabilities |
Implementations will vary in how much persistence they can supply.
Storage is divided into "contexts" identified by a string label. Keys need to be unique only within a given context, so multiple components can share a single storage service safely as long as they use different labels.
The allowable sizes for contexts, keys, and short values can vary and be reported by the implementation to callers, but MUST be at least 255 bytes.
|
Creates a new "short" record in the storage service.
|
|
Creates a new "long" record in the storage service.
|
|
Forcibly removes all records in a given context along with any associated resources devoted to maintaining the context.
|
|
Deletes an existing "short" record from the storage service.
|
|
Deletes an existing "long" record from the storage service.
|
|
Returns the capabilities of the underlying service. If implementations support only the 255 character minimum, the default implementation of this method will suffice.
|
|
Returns an existing "short" record from the storage service. The version parameter can be set for "If-Modified-Since" semantics.
|
|
Returns an existing "long" record from the storage service. The version parameter can be set for "If-Modified-Since" semantics.
|
|
Manually trigger a cleanup of expired records. The method MAY return without guaranteeing that cleanup has already occurred.
|
|
Updates the expiration time of all records in the context.
|
|
Updates an existing "short" record in the storage service.
|
|
Updates an existing "long" record in the storage service.
|