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 objectIOException
public LateralTCPService(ITCPLateralCacheAttributes lca, IElementSerializer serializer) throws IOException
lca
- ITCPLateralCacheAttributes the configuration objectserializer
- the serializer to use when sendingIOException
public void update(ICacheElement<K,V> item) throws IOException
ICacheService
update
in interface ICacheService<K,V>
item
- IOException
public void update(ICacheElement<K,V> item, long requesterId) throws IOException
update
in interface ICacheServiceNonLocal<K,V>
IOException
ICacheServiceNonLocal.update(org.apache.commons.jcs3.engine.behavior.ICacheElement,
long)
public void remove(String cacheName, K key) throws IOException
remove
in interface ICacheService<K,V>
IOException
ICacheService.remove(String, Object)
public void remove(String cacheName, K key, long requesterId) throws IOException
remove
in interface ICacheServiceNonLocal<K,V>
IOException
ICacheServiceNonLocal.remove(String, Object, long)
public void release() throws IOException
release
in interface ICacheService<K,V>
IOException
public void dispose(String cacheName) throws IOException
dispose
in interface ICacheService<K,V>
cacheName
- IOException
public ICacheElement<K,V> get(String cacheName, K key) throws IOException
ICacheService
get
in interface ICacheService<K,V>
cacheName
- key
- IOException
public ICacheElement<K,V> get(String cacheName, K key, long requesterId) throws IOException
get
in interface ICacheServiceNonLocal<K,V>
cacheName
- key
- requesterId
- IOException
public Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern) throws IOException
getMatching
in interface ICacheService<K,V>
cacheName
- pattern
- IOException
public Map<K,ICacheElement<K,V>> getMatching(String cacheName, String pattern, long requesterId) throws IOException
getMatching
in interface ICacheServiceNonLocal<K,V>
cacheName
- pattern
- requesterId
- - our identityIOException
public Map<K,ICacheElement<K,V>> getMultiple(String cacheName, Set<K> keys) throws IOException
getMultiple
in interface ICacheService<K,V>
cacheName
- keys
- IOException
public 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
- IOException
public Set<K> getKeySet(String cacheName) throws IOException
getKeySet
in interface ICacheServiceNonLocal<K,V>
cacheName
- the name of the cache regionIOException
AuxiliaryCache.getKeySet()
public void removeAll(String cacheName) throws IOException
ICacheService
removeAll
in interface ICacheService<K,V>
cacheName
- IOException
public void removeAll(String cacheName, long requesterId) throws IOException
ICacheServiceNonLocal
removeAll
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.