public class LateralTCPService<K,V> extends Object implements ICacheServiceNonLocal<K,V>
| Constructor and Description |
|---|
LateralTCPService(ITCPLateralCacheAttributes lca)
Deprecated.
Specify serializer
|
LateralTCPService(ITCPLateralCacheAttributes lca,
IElementSerializer serializer)
Constructor for the LateralTCPService object
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(String cacheName)
Will close the connection.
|
ICacheElement<K,V> |
get(String cacheName,
K key)
Returns a cache bean from the specified cache; or null if the key does not exist.
|
ICacheElement<K,V> |
get(String cacheName,
K key,
long requesterId)
If get is allowed, we will issues a get request.
|
Set<K> |
getKeySet(String cacheName)
Return the keys in this cache.
|
protected long |
getListenerId() |
Map<K,ICacheElement<K,V>> |
getMatching(String cacheName,
String pattern)
If allow get is true, we will issue a getmatching query.
|
Map<K,ICacheElement<K,V>> |
getMatching(String cacheName,
String pattern,
long requesterId)
If allow get is true, we will issue a getmatching query.
|
Map<K,ICacheElement<K,V>> |
getMultiple(String cacheName,
Set<K> keys)
Gets multiple items from the cache based on the given set of keys.
|
Map<K,ICacheElement<K,V>> |
getMultiple(String cacheName,
Set<K> keys,
long requesterId)
This issues a separate get for each item.
|
static void |
main(String[] args)
Deprecated.
Use unit tests
|
void |
release()
Does nothing.
|
void |
remove(String cacheName,
K key)
Uses the default listener id and calls the next remove method.
|
void |
remove(String cacheName,
K key,
long requesterId)
Wraps the key in a LateralElementDescriptor.
|
void |
removeAll(String cacheName)
Remove all keys from the specified cache.
|
void |
removeAll(String cacheName,
long requesterId)
Remove all keys from the specified cache.
|
protected void |
setListenerId(long listernId) |
void |
update(ICacheElement<K,V> item)
Puts a cache item to the cache.
|
void |
update(ICacheElement<K,V> item,
long requesterId)
If put is allowed, we will issue a put.
|
@Deprecated public LateralTCPService(ITCPLateralCacheAttributes lca) throws IOException
lca - ITCPLateralCacheAttributes the configuration objectIOExceptionpublic LateralTCPService(ITCPLateralCacheAttributes lca, IElementSerializer serializer) throws IOException
lca - ITCPLateralCacheAttributes the configuration objectserializer - the serializer to use when sendingIOExceptionpublic void update(ICacheElement<K,V> item) throws IOException
ICacheServiceupdate in interface ICacheService<K,V>item - IOExceptionpublic void update(ICacheElement<K,V> item, long requesterId) throws IOException
update in interface ICacheServiceNonLocal<K,V>IOExceptionICacheServiceNonLocal.update(org.apache.commons.jcs3.engine.behavior.ICacheElement,
long)public void remove(String cacheName, K key) throws IOException
remove in interface ICacheService<K,V>IOExceptionICacheService.remove(String, Object)public void remove(String cacheName, K key, long requesterId) throws IOException
remove in interface ICacheServiceNonLocal<K,V>IOExceptionICacheServiceNonLocal.remove(String, Object, long)public void release()
throws IOException
release in interface ICacheService<K,V>IOExceptionpublic void dispose(String cacheName) throws IOException
dispose in interface ICacheService<K,V>cacheName - IOExceptionpublic ICacheElement<K,V> get(String cacheName, K key) throws IOException
ICacheServiceget in interface ICacheService<K,V>cacheName - key - IOExceptionpublic ICacheElement<K,V> get(String cacheName, K key, long requesterId) throws IOException
get in interface ICacheServiceNonLocal<K,V>cacheName - key - requesterId - IOExceptionpublic Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern) throws IOException
getMatching in interface ICacheService<K,V>cacheName - pattern - IOExceptionpublic Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern, long requesterId) throws IOException
getMatching in interface ICacheServiceNonLocal<K,V>cacheName - pattern - requesterId - - our identityIOExceptionpublic Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys) throws IOException
getMultiple in interface ICacheService<K,V>cacheName - keys - IOExceptionpublic Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys, long requesterId) throws IOException
TODO We should change this. It should issue one request.
getMultiple in interface ICacheServiceNonLocal<K,V>cacheName - keys - requesterId - IOExceptionpublic Set<K> getKeySet(String cacheName) throws IOException
getKeySet in interface ICacheServiceNonLocal<K,V>cacheName - the name of the cache regionIOExceptionAuxiliaryCache.getKeySet()public void removeAll(String cacheName) throws IOException
ICacheServiceremoveAll in interface ICacheService<K,V>cacheName - IOExceptionpublic void removeAll(String cacheName, long requesterId) throws IOException
ICacheServiceNonLocalremoveAll in interface ICacheServiceNonLocal<K,V>cacheName - requesterId - IOException@Deprecated public static void main(String[] args)
args - protected void setListenerId(long listernId)
listernId - The listernId to set.protected long getListenerId()
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.