public abstract class AbstractRemoteCacheNoWaitFacade<K,V> extends AbstractAuxiliaryCache<K,V>
ICacheType.CacheType
Modifier and Type | Field and Description |
---|---|
protected List<RemoteCacheNoWait<K,V>> |
noWaits
The connection to a remote server, or a zombie.
|
NAME_COMPONENT_DELIMITER
Constructor and Description |
---|
AbstractRemoteCacheNoWaitFacade(List<RemoteCacheNoWait<K,V>> noWaits,
IRemoteCacheAttributes rca,
ICacheEventLogger cacheEventLogger,
IElementSerializer elementSerializer)
Constructs with the given remote cache, and fires events to any listeners.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Adds a dispose request to the remote cache.
|
protected abstract void |
failover(RemoteCacheNoWait<K,V> rcnw)
Begin the failover process if this is a local cache.
|
ICacheElement<K,V> |
get(K key)
Synchronously reads from the remote cache.
|
IRemoteCacheAttributes |
getAuxiliaryCacheAttributes()
This returns the generic attributes for an auxiliary cache.
|
String |
getCacheName()
Gets the cacheName attribute of the RemoteCacheNoWaitFacade object.
|
ICacheType.CacheType |
getCacheType()
Gets the cacheType attribute of the RemoteCacheNoWaitFacade object.
|
String |
getEventLoggingExtraInfo()
This typically returns end point info .
|
Set<K> |
getKeySet()
Return the keys in this cache.
|
Map<K,ICacheElement<K,V>> |
getMatching(String pattern)
Synchronously read from the remote cache.
|
Map<K,ICacheElement<K,V>> |
getMultiple(Set<K> keys)
Gets multiple items from the cache based on the given set of keys.
|
RemoteCacheNoWait<K,V> |
getPrimaryServer()
Get the primary server from the list of failovers
|
int |
getSize()
No remote invocation.
|
IStats |
getStatistics() |
String |
getStats()
getStats
|
CacheStatus |
getStatus()
Gets the status attribute of the RemoteCacheNoWaitFacade object
Return ALIVE if any are alive.
|
boolean |
remove(K key)
Adds a remove request to the remote cache.
|
void |
removeAll()
Adds a removeAll request to the remote cache.
|
void |
restorePrimaryServer(RemoteCacheNoWait<K,V> rcnw)
restore the primary server in the list of failovers
|
String |
toString()
String form of some of the configuration information for the remote cache.
|
void |
update(ICacheElement<K,V> ce)
Put an element in the cache.
|
createICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, processGetMultiple, setCacheEventLogger, setElementSerializer, setKeyMatcher
protected List<RemoteCacheNoWait<K,V>> noWaits
public AbstractRemoteCacheNoWaitFacade(List<RemoteCacheNoWait<K,V>> noWaits, IRemoteCacheAttributes rca, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer)
noWaits
- rca
- cacheEventLogger
- elementSerializer
- public void update(ICacheElement<K,V> ce) throws IOException
ce
- IOException
public ICacheElement<K,V> get(K key) throws IOException
get
in interface ICache<K,V>
get
in class AbstractAuxiliaryCache<K,V>
key
- IOException
public Map<K,ICacheElement<K,V>> getMatching(String pattern) throws IOException
pattern
- IOException
public Map<K,ICacheElement<K,V>> getMultiple(Set<K> keys) throws IOException
keys
- IOException
public Set<K> getKeySet() throws IOException
IOException
- if access to the auxiliary cache failsAuxiliaryCache.getKeySet()
public boolean remove(K key) throws IOException
key
- IOException
public void removeAll() throws IOException
IOException
public void dispose()
public int getSize()
public ICacheType.CacheType getCacheType()
public String getCacheName()
public CacheStatus getStatus()
Return ALIVE if any are alive.
public String toString()
protected abstract void failover(RemoteCacheNoWait<K,V> rcnw)
rcnw
- The no wait in error.public RemoteCacheNoWait<K,V> getPrimaryServer()
public void restorePrimaryServer(RemoteCacheNoWait<K,V> rcnw)
public IRemoteCacheAttributes getAuxiliaryCacheAttributes()
AuxiliaryCache
public IStats getStatistics()
public String getEventLoggingExtraInfo()
getEventLoggingExtraInfo
in class AbstractAuxiliaryCache<K,V>
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.