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.IOException
public void update(ICacheElement item) throws java.io.IOException
ICacheService
update
in interface ICacheService
item
- java.io.IOException
public void update(ICacheElement item, long requesterId) throws java.io.IOException
update
in interface ILateralCacheService
java.io.IOException
ILateralCacheService.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 ICacheService
java.io.IOException
ICacheService.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 ILateralCacheService
java.io.IOException
ILateralCacheService.remove(java.lang.String,
java.io.Serializable, long)
public void release() throws java.io.IOException
release
in interface ICacheService
java.io.IOException
public void dispose(java.lang.String cacheName) throws java.io.IOException
dispose
in interface ICacheService
cacheName
- java.io.IOException
public java.io.Serializable get(java.lang.String key) throws java.io.IOException
key
- java.io.IOException
public ICacheElement get(java.lang.String cacheName, java.io.Serializable key) throws java.io.IOException
ICacheService
get
in interface ICacheService
cacheName
- key
- java.io.IOException
public java.util.Map getMatching(java.lang.String cacheName, java.lang.String pattern) throws java.io.IOException
getMatching
in interface ILateralCacheService
getMatching
in interface ICacheService
cacheName
- pattern
- java.io.IOException
public java.util.Map getMultiple(java.lang.String cacheName, java.util.Set keys) throws java.io.IOException
getMultiple
in interface ICacheService
cacheName
- keys
- java.io.IOException
public java.util.Set getGroupKeys(java.lang.String cacheName, java.lang.String group)
getGroupKeys
in interface ILateralCacheService
cacheName
- group
- public void removeAll(java.lang.String cacheName) throws java.io.IOException
ICacheService
removeAll
in interface ICacheService
cacheName
- java.io.IOException
public void removeAll(java.lang.String cacheName, long requesterId) throws java.io.IOException
ILateralCacheService
removeAll
in interface ILateralCacheService
cacheName
- requesterId
- java.io.IOException
public static void main(java.lang.String[] args)
args
- public void addCacheListener(java.lang.String cacheName, ICacheListener obj) throws java.io.IOException
ICacheObserver
addCacheListener
in interface ICacheObserver
cacheName
- obj
- java.io.IOException
public void addCacheListener(ICacheListener obj) throws java.io.IOException
ICacheObserver
addCacheListener
in interface ICacheObserver
obj
- java.io.IOException
public void removeCacheListener(java.lang.String cacheName, ICacheListener obj) throws java.io.IOException
ICacheObserver
removeCacheListener
in interface ICacheObserver
cacheName
- obj
- java.io.IOException
public void removeCacheListener(ICacheListener obj) throws java.io.IOException
ICacheObserver
removeCacheListener
in interface ICacheObserver
obj
- java.io.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()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.