|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPService<K,V>
public class LateralTCPService<K extends Serializable,V extends Serializable>
A lateral cache service implementation. Does not implement getGroupKey
| Constructor Summary | |
|---|---|
LateralTCPService(ITCPLateralCacheAttributes lca)
Constructor for the LateralTCPService object |
|
| Method Summary | ||
|---|---|---|
|
addCacheListener(ICacheListener<KK,VV> obj)
Subscribes to all caches. |
|
|
addCacheListener(String cacheName,
ICacheListener<KK,VV> obj)
Subscribes to the specified cache. |
|
void |
dispose(String cacheName)
Will close the connection. |
|
Serializable |
get(String key)
The service does not get via this method, so this return null. |
|
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> |
getGroupKeys(String cacheName,
String group)
Gets the set of keys of objects currently in the group |
|
Set<String> |
getGroupNames(String cacheName)
Gets the set of groups currently in the cache throws UnsupportedOperationException |
|
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. |
|
ITCPLateralCacheAttributes |
getTcpLateralCacheAttributes()
|
|
static void |
main(String[] args)
|
|
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. |
|
|
removeCacheListener(ICacheListener<KK,VV> obj)
Unsubscribes from all caches. |
|
|
removeCacheListener(String cacheName,
ICacheListener<KK,VV> obj)
Unsubscribes from the specified cache. |
|
protected void |
setListenerId(long listernId)
|
|
void |
setTcpLateralCacheAttributes(ITCPLateralCacheAttributes tcpLateralCacheAttributes)
|
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LateralTCPService(ITCPLateralCacheAttributes lca)
throws IOException
lca - ITCPLateralCacheAttributes
IOException| Method Detail |
|---|
public void update(ICacheElement<K,V> item)
throws IOException
ICacheService
update in interface ICacheService<K extends Serializable,V extends Serializable>item -
IOException
public void update(ICacheElement<K,V> item,
long requesterId)
throws IOException
update in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>IOExceptionorg.apache.jcs.auxiliary.lateral.behavior.ICacheServiceNonLocal#update(org.apache.jcs.engine.behavior.ICacheElement,
long)
public void remove(String cacheName,
K key)
throws IOException
remove in interface ICacheService<K extends Serializable,V extends Serializable>IOExceptionICacheService.remove(java.lang.String,
java.io.Serializable)
public void remove(String cacheName,
K key,
long requesterId)
throws IOException
remove in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>IOExceptionorg.apache.jcs.auxiliary.lateral.behavior.ICacheServiceNonLocal#remove(java.lang.String,
java.io.Serializable, long)
public void release()
throws IOException
release in interface ICacheService<K extends Serializable,V extends Serializable>IOException
public void dispose(String cacheName)
throws IOException
dispose in interface ICacheService<K extends Serializable,V extends Serializable>cacheName -
IOException
public Serializable get(String key)
throws IOException
key -
IOException
public ICacheElement<K,V> get(String cacheName,
K key)
throws IOException
ICacheService
get in interface ICacheService<K extends Serializable,V extends Serializable>cacheName - key -
IOException
public ICacheElement<K,V> get(String cacheName,
K key,
long requesterId)
throws IOException
get in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>cacheName - key - requesterId -
IOException
public Map<K,ICacheElement<K,V>> getMatching(String cacheName,
String pattern)
throws IOException
getMatching in interface ICacheService<K extends Serializable,V extends Serializable>cacheName - pattern -
IOException
public Map<K,ICacheElement<K,V>> getMatching(String cacheName,
String pattern,
long requesterId)
throws IOException
getMatching in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>cacheName - pattern - requesterId - - our identity
IOException
public Map<K,ICacheElement<K,V>> getMultiple(String cacheName,
Set<K> keys)
throws IOException
getMultiple in interface ICacheService<K extends Serializable,V extends Serializable>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 extends Serializable,V extends Serializable>cacheName - keys - requesterId -
IOException
public Set<K> getGroupKeys(String cacheName,
String group)
throws IOException
getGroupKeys in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>cacheName - group -
IOException
public Set<String> getGroupNames(String cacheName)
throws IOException
getGroupNames in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>cacheName -
IOException
public void removeAll(String cacheName)
throws IOException
ICacheService
removeAll in interface ICacheService<K extends Serializable,V extends Serializable>cacheName -
IOException
public void removeAll(String cacheName,
long requesterId)
throws IOException
ICacheServiceNonLocal
removeAll in interface ICacheServiceNonLocal<K extends Serializable,V extends Serializable>cacheName - requesterId -
IOExceptionpublic static void main(String[] args)
args -
public <KK extends Serializable,VV extends Serializable> void addCacheListener(String cacheName,
ICacheListener<KK,VV> obj)
throws IOException
ICacheObserver
addCacheListener in interface ICacheObservercacheName - obj -
IOException
public <KK extends Serializable,VV extends Serializable> void addCacheListener(ICacheListener<KK,VV> obj)
throws IOException
ICacheObserver
addCacheListener in interface ICacheObserverobj -
IOException
public <KK extends Serializable,VV extends Serializable> void removeCacheListener(String cacheName,
ICacheListener<KK,VV> obj)
throws IOException
ICacheObserver
removeCacheListener in interface ICacheObservercacheName - obj -
IOException
public <KK extends Serializable,VV extends Serializable> void removeCacheListener(ICacheListener<KK,VV> obj)
throws IOException
ICacheObserver
removeCacheListener in interface ICacheObserverobj -
IOExceptionprotected void setListenerId(long listernId)
listernId - The listernId to set.protected long getListenerId()
public void setTcpLateralCacheAttributes(ITCPLateralCacheAttributes tcpLateralCacheAttributes)
tcpLateralCacheAttributes - The tcpLateralCacheAttributes to set.public ITCPLateralCacheAttributes getTcpLateralCacheAttributes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||