|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alachisoft.ncache.web.caching.CacheSyncDependency
public class CacheSyncDependency
A client application can have more than one cache instances initialized.
CacheSyncDependency keeps the items present in one cache synchronized with
the items present in another cache.
You can add items with CacheSyncDependency to your application's cache with the
Cache.add
and Cache.insert
methods.
When you add an item to an application's Cache
object with
CacheSyncDependency
, it monitors the remote cache (the cache you want your local cache
to be synchronized with) for changes. As soon as an item is updated in or removed from the remote cache
this change is automatically updated in the local cache if the CacheSyncDependency was provided with the
cache items.
This helps you keep your local cache synchronized with the remote cache all the time.
CacheSyncDependency
Constructor Summary | |
---|---|
CacheSyncDependency(java.lang.String remoteCacheId,
java.lang.String key)
Initializes a new instance of the CacheSyncDependency with the specified parameters. |
|
CacheSyncDependency(java.lang.String remoteCacheId,
java.lang.String key,
java.lang.String server,
int port)
Initializes a new instance of the CacheSyncDependency with the specified parameters. |
Method Summary | |
---|---|
java.lang.String |
getCacheId()
The unique Id of the remote cache |
java.lang.String |
getKey()
The key of the item in the remote cache with which the local cache item needs to be synchronized. |
int |
getPort()
The server port that is used by the clients to connect to the server. |
java.lang.String |
getServer()
The name of the server where the remote cache is running. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheSyncDependency(java.lang.String remoteCacheId, java.lang.String key)
remoteCacheId
- The unique id of the remote cache.key
- The key of the item in the remote cache with which the
local cache item will be kept synchronized.public CacheSyncDependency(java.lang.String remoteCacheId, java.lang.String key, java.lang.String server, int port)
remoteCacheId
- The unique id of the remote cache.key
- The key of the item in the remote cache with which the
local cache item will be kept synchronized.server
- The name of the server where the remote cache is running.port
- The port used by the client to connect to the server.Method Detail |
---|
public java.lang.String getCacheId()
public java.lang.String getKey()
public int getPort()
public java.lang.String getServer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |