public class InMemoryCacheStoreComponent extends Object implements ICacheStoreComponent
ICacheStoreComponent interface.
This implementation simply stores cached data in memory.| Constructor and Description |
|---|
InMemoryCacheStoreComponent()
Constructor.
|
InMemoryCacheStoreComponent(Map<String,String> config)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> void |
get(String cacheKey,
Class<T> type,
IAsyncResultHandler<T> handler)
Gets a cache entry.
|
<T> void |
getBinary(String cacheKey,
Class<T> type,
IAsyncResultHandler<ISignalReadStream<T>> handler)
Gets a cache entry with its binary data.
|
<T> void |
put(String cacheKey,
T jsonObject,
long timeToLive)
Put an entry into the cache.
|
<T> ISignalWriteStream |
putBinary(String cacheKey,
T jsonObject,
long timeToLive)
Open a cache store entry so that data can be streamed into it.
|
void |
setBufferFactory(IBufferFactoryComponent bufferFactory) |
public <T> void put(String cacheKey, T jsonObject, long timeToLive) throws IOException
ICacheStoreComponentput in interface ICacheStoreComponentIOExceptionICacheStoreComponent.put(java.lang.String, java.lang.Object, long)public <T> ISignalWriteStream putBinary(String cacheKey, T jsonObject, long timeToLive) throws IOException
ICacheStoreComponentputBinary in interface ICacheStoreComponentIOExceptionICacheStoreComponent.putBinary(java.lang.String, java.lang.Object, long)public <T> void get(String cacheKey, Class<T> type, IAsyncResultHandler<T> handler)
ICacheStoreComponentget in interface ICacheStoreComponentICacheStoreComponent.get(java.lang.String, java.lang.Class, io.apiman.gateway.engine.async.IAsyncResultHandler)public <T> void getBinary(String cacheKey, Class<T> type, IAsyncResultHandler<ISignalReadStream<T>> handler)
ICacheStoreComponentgetBinary in interface ICacheStoreComponentICacheStoreComponent.getBinary(java.lang.String, java.lang.Class, io.apiman.gateway.engine.async.IAsyncResultHandler)public void setBufferFactory(IBufferFactoryComponent bufferFactory)
bufferFactory - the bufferFactory to setCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.