public class CacheImpl extends Object implements Cache
Constructor and Description |
---|
CacheImpl()
Constructor.
|
CacheImpl(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
check(String... keys)
Checks if a given key is in the cache.
|
Object |
get(String... keys)
Retrieves an object from the cache.
|
void |
initialize(String[] cacheLevelConfig)
Initializes the cache.
|
void |
put(Object value,
String... keys)
Adds an object to the cache.
|
void |
remove(String... keys)
Removes a branch or leaf from the cache.
|
void |
removeAll()
Removes all entries from the cache.
|
String |
toString() |
void |
writeLock()
Applies a write lock.
|
void |
writeUnlock()
Releases a write lock.
|
public CacheImpl()
public CacheImpl(String name)
public void initialize(String[] cacheLevelConfig)
Cache
initialize
in interface Cache
cacheLevelConfig
- the level configuration strings from the root to the leafspublic Object get(String... keys)
Cache
public void put(Object value, String... keys)
Cache
public void remove(String... keys)
Cache
public void removeAll()
Cache
public int check(String... keys)
Cache
public void writeLock()
Cache
public void writeUnlock()
Cache
writeUnlock
in interface Cache
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.