public class LateralTCPService extends java.lang.Object implements ILateralCacheService, ILateralCacheObserver
| Constructor and Description |
|---|
LateralTCPService(ITCPLateralCacheAttributes lca)
Constructor for the LateralTCPService object
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheListener(ICacheListener obj)
Subscribes to all caches.
|
void |
addCacheListener(java.lang.String cacheName,
ICacheListener obj)
Subscribes to the specified cache.
|
void |
dispose(java.lang.String cacheName)
Will close the connection.
|
java.io.Serializable |
get(java.lang.String key)
The service does not get via this method, so this return null.
|
ICacheElement |
get(java.lang.String cacheName,
java.io.Serializable key)
Returns a cache bean from the specified cache; or null if the key does not exist.
|
java.util.Set |
getGroupKeys(java.lang.String cacheName,
java.lang.String group)
Gets the set of keys of objects currently in the group throws UnsupportedOperationException
|
protected long |
getListenerId() |
java.util.Map |
getMatching(java.lang.String cacheName,
java.lang.String pattern)
The service does not get via this method, so this return empty.
|
java.util.Map |
getMultiple(java.lang.String cacheName,
java.util.Set keys)
Gets multiple items from the cache based on the given set of keys.
|
ITCPLateralCacheAttributes |
getTcpLateralCacheAttributes() |
static void |
main(java.lang.String[] args) |
void |
release()
Does nothing.
|
void |
remove(java.lang.String cacheName,
java.io.Serializable key)
Uses the default listener id and calls the next remove method.
|
void |
remove(java.lang.String cacheName,
java.io.Serializable key,
long requesterId)
Wraps the key in a LateralElementDescriptor.
|
void |
removeAll(java.lang.String cacheName)
Remove all keys from the sepcified cache.
|
void |
removeAll(java.lang.String cacheName,
long requesterId)
Remove all keys from the sepcified cache.
|
void |
removeCacheListener(ICacheListener obj)
Unsubscribes from all caches.
|
void |
removeCacheListener(java.lang.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.
|
public LateralTCPService(ITCPLateralCacheAttributes lca) throws java.io.IOException
lca - ITCPLateralCacheAttributesjava.io.IOExceptionpublic void update(ICacheElement item) throws java.io.IOException
ICacheServiceupdate in interface ICacheServiceitem - java.io.IOExceptionpublic void update(ICacheElement item, long requesterId) throws java.io.IOException
update in interface ILateralCacheServicejava.io.IOExceptionILateralCacheService.update(org.apache.jcs.engine.behavior.ICacheElement,
long)public void remove(java.lang.String cacheName,
java.io.Serializable key)
throws java.io.IOException
remove in interface ICacheServicejava.io.IOExceptionICacheService.remove(java.lang.String,
java.io.Serializable)public void remove(java.lang.String cacheName,
java.io.Serializable key,
long requesterId)
throws java.io.IOException
remove in interface ILateralCacheServicejava.io.IOExceptionILateralCacheService.remove(java.lang.String,
java.io.Serializable, long)public void release()
throws java.io.IOException
release in interface ICacheServicejava.io.IOExceptionpublic void dispose(java.lang.String cacheName)
throws java.io.IOException
dispose in interface ICacheServicecacheName - java.io.IOExceptionpublic java.io.Serializable get(java.lang.String key)
throws java.io.IOException
key - java.io.IOExceptionpublic ICacheElement get(java.lang.String cacheName, java.io.Serializable key) throws java.io.IOException
ICacheServiceget in interface ICacheServicecacheName - key - java.io.IOExceptionpublic java.util.Map getMatching(java.lang.String cacheName,
java.lang.String pattern)
throws java.io.IOException
getMatching in interface ILateralCacheServicegetMatching in interface ICacheServicecacheName - pattern - java.io.IOExceptionpublic java.util.Map getMultiple(java.lang.String cacheName,
java.util.Set keys)
throws java.io.IOException
getMultiple in interface ICacheServicecacheName - keys - java.io.IOExceptionpublic java.util.Set getGroupKeys(java.lang.String cacheName,
java.lang.String group)
getGroupKeys in interface ILateralCacheServicecacheName - group - public void removeAll(java.lang.String cacheName)
throws java.io.IOException
ICacheServiceremoveAll in interface ICacheServicecacheName - java.io.IOExceptionpublic void removeAll(java.lang.String cacheName,
long requesterId)
throws java.io.IOException
ILateralCacheServiceremoveAll in interface ILateralCacheServicecacheName - requesterId - java.io.IOExceptionpublic static void main(java.lang.String[] args)
args - public void addCacheListener(java.lang.String cacheName,
ICacheListener obj)
throws java.io.IOException
ICacheObserveraddCacheListener in interface ICacheObservercacheName - obj - java.io.IOExceptionpublic void addCacheListener(ICacheListener obj) throws java.io.IOException
ICacheObserveraddCacheListener in interface ICacheObserverobj - java.io.IOExceptionpublic void removeCacheListener(java.lang.String cacheName,
ICacheListener obj)
throws java.io.IOException
ICacheObserverremoveCacheListener in interface ICacheObservercacheName - obj - java.io.IOExceptionpublic void removeCacheListener(ICacheListener obj) throws java.io.IOException
ICacheObserverremoveCacheListener in interface ICacheObserverobj - java.io.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()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.