public class ArcacheInMemoryClient extends Object implements ArcacheBackendClient
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cacheIsolation
When cache is isolated, all the stored objects are serialized to be stored,
And deserialized to be retrieved from cache
|
protected int |
lruMaxSize |
protected ObjectSerializer |
objectSerializer |
protected org.apache.commons.collections4.map.LRUMap<String,MemoryObject> |
storage |
| Constructor and Description |
|---|
ArcacheInMemoryClient() |
ArcacheInMemoryClient(int maxSize) |
ArcacheInMemoryClient(int maxSize,
boolean cacheIsolation) |
| Modifier and Type | Method and Description |
|---|---|
Future<Object> |
asyncGet(String key) |
Future<Boolean> |
asyncSet(String key,
long ttlMillis,
Object value) |
void |
clear() |
Object |
get(String key) |
void |
remove(String key) |
boolean |
set(String key,
long ttlMillis,
Object value) |
protected org.apache.commons.collections4.map.LRUMap<String,MemoryObject> storage
protected ObjectSerializer objectSerializer
protected int lruMaxSize
protected boolean cacheIsolation
public ArcacheInMemoryClient()
public ArcacheInMemoryClient(int maxSize)
public ArcacheInMemoryClient(int maxSize,
boolean cacheIsolation)
public Future<Boolean> asyncSet(String key, long ttlMillis, Object value)
asyncSet in interface ArcacheBackendClientpublic Future<Object> asyncGet(String key)
asyncGet in interface ArcacheBackendClientpublic void remove(String key)
public void clear()
Copyright © 2019. All rights reserved.