public class RedisStore extends BaseStore
storeListenersCLUSTERED, PERSISTENT, TRANSACTIONAL| Constructor and Description |
|---|
RedisStore(org.idevlab.rjc.RedisNode redisNode,
java.lang.String storeName)
Constructor
|
RedisStore(org.idevlab.rjc.RedisNode redisNode,
java.lang.String storeName,
java.lang.Long timeout) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
evict(java.lang.String id)
Loads an object that has been previously stored under the specified key.
|
boolean |
hasFeature(java.lang.String feature)
Returns true if feature is provided by the store (clustered), false else.
|
java.lang.Object |
load(java.lang.String id)
Loads an object that has been previously stored under the specified key.
|
java.lang.Object |
peek(java.lang.String id)
Loads an object that has been previously stored under the specified key.
|
java.lang.String |
store(java.lang.Object data)
Put an object into the store and return the unique id that
may be used at a later time to retrieve the object.
|
void |
store(java.lang.String id,
java.lang.Object data)
Put an object in the store under the given id.
|
addListener, fireAddedEvent, fireEvictedEvent, fireRemovedEvent, getStoreListeners, removeListenerpublic RedisStore(org.idevlab.rjc.RedisNode redisNode,
java.lang.String storeName)
redisNode - storeName - public RedisStore(org.idevlab.rjc.RedisNode redisNode,
java.lang.String storeName,
java.lang.Long timeout)
public boolean hasFeature(java.lang.String feature)
Returns true if feature is provided by the store (clustered), false else.
feature - the feature.public void store(java.lang.String id,
java.lang.Object data)
throws java.io.IOException
Put an object in the store under the given id. This method must be used with caution and the behavior is unspecified if an object already exist for the same id.
id - the id of the object to storedata - the object to storejava.io.IOException - if an error occurspublic java.lang.String store(java.lang.Object data)
throws java.io.IOException
Put an object into the store and return the unique id that may be used at a later time to retrieve the object.
data - the object to storejava.io.IOException - if an error occurspublic java.lang.Object load(java.lang.String id)
throws java.io.IOException
Loads an object that has been previously stored under the specified key. The object is removed from the store.
id - the id of the objectnull> if the object could not be foundjava.io.IOException - if an error occurspublic java.lang.Object evict(java.lang.String id)
throws java.io.IOException
Loads an object that has been previously stored under the specified key. The object is removed from the store.
id - the id of the objectnull> if the object could not be foundjava.io.IOException - if an error occurspublic java.lang.Object peek(java.lang.String id)
throws java.io.IOException
Loads an object that has been previously stored under the specified key. The object is not removed from the store.
id - the id of the objectnull if the object could not be foundjava.io.IOException - if an error occursCopyright © 2005-2014 FuseSource. All Rights Reserved.