public interface IDataStoreComponent extends IComponent
CachedResponse instances
It is up to the implementation of this component to determine how transactional
it might be (there are time vs. accuracy tradeoffs to be made here). Users
of API Management will need to ensure they use an appropriate implementation
of this component based on the data integrity/accuracy guarantees they require.
All operations in this component are assumed to be asyncrhonous, so a handler
must be provided if the policy implementation needs the operation to finish
prior to moving on.| Modifier and Type | Method and Description |
|---|---|
<T> void |
clearProperty(String namespace,
String propertyName,
IAsyncResultHandler<T> handler)
Clears a property from the shared state environment, returning the previous
value of the property or null if it was not previously set.
|
<T> void |
getProperty(String namespace,
String propertyName,
T defaultValue,
IAsyncResultHandler<T> handler)
Gets the value of a single property stored in the shared state
environment.
|
<T> boolean |
hasProperty(String namespace,
String propertyName)
Checks whether the requested property exists in the Data Store
|
<T> void |
setProperty(String namespace,
String propertyName,
T value,
IAsyncResultHandler<T> handler)
Sets a single property in the shared state environment, returning
the previous value of the property or null if it was not previously set.
|
<T> void |
setProperty(String namespace,
String propertyName,
T value,
Long expiration,
IAsyncResultHandler<T> handler)
Sets a single property in the shared state environment for the given period of time,
returning the previous value of the property or null if it was not previously set.
|
<T> boolean hasProperty(String namespace, String propertyName)
namespace - propertyName - <T> void getProperty(String namespace, String propertyName, T defaultValue, IAsyncResultHandler<T> handler)
namespace - propertyName - defaultValue - handler - <T> void setProperty(String namespace, String propertyName, T value, IAsyncResultHandler<T> handler)
namespace - propertyName - value - handler - <T> void setProperty(String namespace, String propertyName, T value, Long expiration, IAsyncResultHandler<T> handler)
namespace - propertyName - value - expiration - time for the property to be kept in the DataStore before being considered as expiredhandler - <T> void clearProperty(String namespace, String propertyName, IAsyncResultHandler<T> handler)
namespace - propertyName - handler - Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.