|
||||||||||
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
public class LateralTCPService
A lateral cache service implementation. Does not implement getGroupKey
Constructor Summary | |
---|---|
LateralTCPService(ITCPLateralCacheAttributes lca)
Constructor for the LateralTCPService object |
Method Summary | |
---|---|
void |
addCacheListener(ICacheListener obj)
Subscribes to all caches. |
void |
addCacheListener(String cacheName,
ICacheListener 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 |
get(String cacheName,
Serializable key)
Returns a cache bean from the specified cache; or null if the key does not exist. |
ICacheElement |
get(String cacheName,
Serializable key,
long requesterId)
If get is allowed, we will issues a get request. |
Set |
getGroupKeys(String cacheName,
String group)
Gets the set of keys of objects currently in the group throws UnsupportedOperationException |
protected long |
getListenerId()
|
Map |
getMatching(String cacheName,
String pattern)
If allow get is true, we will issue a getmatching query. |
Map |
getMatching(String cacheName,
String pattern,
long requesterId)
If allow get is true, we will issue a getmatching query. |
Map |
getMultiple(String cacheName,
Set keys)
Gets multiple items from the cache based on the given set of keys. |
Map |
getMultiple(String cacheName,
Set 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,
Serializable key)
Uses the default listener id and calls the next remove method. |
void |
remove(String cacheName,
Serializable key,
long requesterId)
Wraps the key in a LateralElementDescriptor. |
void |
removeAll(String cacheName)
Remove all keys from the sepcified cache. |
void |
removeAll(String cacheName,
long requesterId)
Remove all keys from the specified cache. |
void |
removeCacheListener(ICacheListener obj)
Unsubscribes from all caches. |
void |
removeCacheListener(String cacheName,
ICacheListener obj)
Unsubscribes from the specified cache. |
protected void |
setListenerId(long listernId)
|
void |
setTcpLateralCacheAttributes(ITCPLateralCacheAttributes tcpLateralCacheAttributes)
|
void |
update(ICacheElement item)
Puts a cache item to the cache. |
void |
update(ICacheElement 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 item) throws IOException
ICacheService
update
in interface ICacheService
item
-
IOException
public void update(ICacheElement item, long requesterId) throws IOException
update
in interface ICacheServiceNonLocal
IOException
ICacheServiceNonLocal.update(org.apache.jcs.engine.behavior.ICacheElement,
long)
public void remove(String cacheName, Serializable key) throws IOException
remove
in interface ICacheService
IOException
ICacheService.remove(java.lang.String,
java.io.Serializable)
public void remove(String cacheName, Serializable key, long requesterId) throws IOException
remove
in interface ICacheServiceNonLocal
IOException
ICacheServiceNonLocal.remove(java.lang.String,
java.io.Serializable, long)
public void release() throws IOException
release
in interface ICacheService
IOException
public void dispose(String cacheName) throws IOException
dispose
in interface ICacheService
cacheName
-
IOException
public Serializable get(String key) throws IOException
key
-
IOException
public ICacheElement get(String cacheName, Serializable key) throws IOException
ICacheService
get
in interface ICacheService
cacheName
- key
-
IOException
public ICacheElement get(String cacheName, Serializable key, long requesterId) throws IOException
get
in interface ICacheServiceNonLocal
cacheName
- key
- requesterId
-
IOException
public Map getMatching(String cacheName, String pattern) throws IOException
getMatching
in interface ICacheService
cacheName
- pattern
-
IOException
public Map getMatching(String cacheName, String pattern, long requesterId) throws IOException
getMatching
in interface ICacheServiceNonLocal
cacheName
- pattern
- requesterId
- - our identity
IOException
public Map getMultiple(String cacheName, Set keys) throws IOException
getMultiple
in interface ICacheService
cacheName
- keys
-
IOException
public Map getMultiple(String cacheName, Set keys, long requesterId) throws IOException
TODO We should change this. It should issue one request.
getMultiple
in interface ICacheServiceNonLocal
cacheName
- keys
- requesterId
-
IOException
public Set getGroupKeys(String cacheName, String group)
getGroupKeys
in interface ICacheServiceNonLocal
cacheName
- group
-
public void removeAll(String cacheName) throws IOException
ICacheService
removeAll
in interface ICacheService
cacheName
-
IOException
public void removeAll(String cacheName, long requesterId) throws IOException
ICacheServiceNonLocal
removeAll
in interface ICacheServiceNonLocal
cacheName
- requesterId
-
IOException
public static void main(String[] args)
args
- public void addCacheListener(String cacheName, ICacheListener obj) throws IOException
ICacheObserver
addCacheListener
in interface ICacheObserver
cacheName
- obj
-
IOException
public void addCacheListener(ICacheListener obj) throws IOException
ICacheObserver
addCacheListener
in interface ICacheObserver
obj
-
IOException
public void removeCacheListener(String cacheName, ICacheListener obj) throws IOException
ICacheObserver
removeCacheListener
in interface ICacheObserver
cacheName
- obj
-
IOException
public void removeCacheListener(ICacheListener obj) throws IOException
ICacheObserver
removeCacheListener
in interface ICacheObserver
obj
-
IOException
protected 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 |