K
- the type of the cache entry keysV
- the type of the cache entry valuespublic class ReadonlyNamedCache<K,V> extends WrapperNamedCache<K,V>
WrapperConcurrentMap.Lock
WrapperObservableMap.InternalListener
AbstractKeySetBasedMap.EntrySet, AbstractKeySetBasedMap.KeyIterator, AbstractKeySetBasedMap.KeySet, AbstractKeySetBasedMap.ValuesCollection
AbstractKeyBasedMap.DeferredCacheEvent<K,V>
Base.LoggingWriter, Base.StackFrame
NamedCache.Option
QueryMap.Entry<K,V>
InvocableMap.Entry<K,V>, InvocableMap.EntryAggregator<K,V,R>, InvocableMap.EntryProcessor<K,V,R>, InvocableMap.ParallelAwareAggregator<K,V,P,R>, InvocableMap.StreamingAggregator<K,V,P,R>
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_fStrict
Specifies whether or not the "read-only" nature of this NamedCache
is strictly enforced.
|
m_service, m_sName
m_cWaitMillis, m_fEnforceLocking, m_gateMap, m_mapLock
m_fDeferredEvent, m_fTranslateEvents, m_listenerInternal, m_listenerSupport, m_map, m_stats
LOG_ALWAYS, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_MAX, LOG_MIN, LOG_QUIET, LOG_WARN, POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_US
EXPIRY_DEFAULT, EXPIRY_NEVER
LOCK_ALL
Constructor and Description |
---|
ReadonlyNamedCache(Map<K,V> map,
String sName,
boolean fStrict)
Construct a NamedCache wrapper based on the specified map.
|
ReadonlyNamedCache(NamedCache<K,V> cache,
boolean fStrict)
Construct a NamedCache wrapper based on the specified map.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkStrict()
Enforce the "strict" read-only policy.
|
void |
clear()
Should not be called.
|
void |
destroy()
Should not be called.
|
<R> R |
invoke(K key,
InvocableMap.EntryProcessor<K,V,R> agent)
Should not be called.
|
<R> Map<K,R> |
invokeAll(Collection<? extends K> collKeys,
InvocableMap.EntryProcessor<K,V,R> agent)
Should not be called.
|
<R> Map<K,R> |
invokeAll(Filter filter,
InvocableMap.EntryProcessor<K,V,R> agent)
Should not be called.
|
boolean |
lock(Object oKey)
Should not be called.
|
boolean |
lock(Object oKey,
long cWait)
Should not be called.
|
V |
put(K oKey,
V oValue)
Should not be called.
|
void |
putAll(Map<? extends K,? extends V> map)
Should not be called.
|
V |
remove(Object oKey)
Should not be called.
|
protected boolean |
removeBlind(Object oKey)
Should not be called.
|
void |
truncate()
Should not be called.
|
boolean |
unlock(Object oKey)
Should not be called.
|
addIndex, aggregate, aggregate, entrySet, entrySet, getAll, getCacheName, getCacheService, isActive, isDestroyed, isReleased, keySet, put, release, removeIndex
getDescription, getLockDescription, getWaitMillis, instantiateLock, isInternalKeySetIteratorMutable, isLockingEnforced, setLockingEnforced, setWaitMillis, toString
addMapListener, addMapListener, addMapListener, containsValue, dispatchEvent, dispatchPendingEvent, ensureInternalListener, ensureMapListenerSupport, equals, get, getCacheStatistics, getInternalKeySet, getMap, getMapListenerSupport, hashCode, hasListeners, instantiateInternalListener, isCollectStats, isEventFabricator, isSynthetic, isTranslateEvents, removeMapListener, removeMapListener, removeMapListener, setCollectStats, setTranslateEvents
containsKey, instantiateEntrySet, instantiateKeyIterator, instantiateKeySet, instantiateValues, isEmpty, iterateKeys, size
clone, entrySet, keySet, values
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
finalize, getClass, notify, notifyAll, wait, wait, wait
as, async, async, getName, getService, view
close
addMapListener, addMapListener, addMapListener, removeMapListener, removeMapListener, removeMapListener
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
containsKey, containsValue, get, isEmpty, size
aggregate, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, getOrDefault, invokeAll, merge, merge, putIfAbsent, remove, replace, replace, replaceAll, replaceAll, replaceAll, replaceAll, stream, stream, stream, stream, stream, stream
protected boolean m_fStrict
public ReadonlyNamedCache(NamedCache<K,V> cache, boolean fStrict)
cache
- the NamedCache object that will be wrapped by this
read-only wrapperfStrict
- if true, calls to mutating operations will throw
the UnsupportedOperationException; otherwise those calls
will have no effect whatsoeverpublic ReadonlyNamedCache(Map<K,V> map, String sName, boolean fStrict)
map
- the Map that will be wrapped by this read-only wrappersName
- the cache namefStrict
- if true, calls to mutating operations will throw
the UnsupportedOperationException; otherwise those calls
will have no effect whatsoeverpublic void destroy()
destroy
in interface NamedCollection
destroy
in class WrapperNamedCache<K,V>
public void truncate()
truncate
in interface NamedCache<K,V>
truncate
in class WrapperNamedCache<K,V>
public <R> R invoke(K key, InvocableMap.EntryProcessor<K,V,R> agent)
invoke
in interface InvocableMap<K,V>
invoke
in class WrapperNamedCache<K,V>
R
- the type of value returned by the EntryProcessorkey
- the key to process; it is not required to exist within
the Mapagent
- the EntryProcessor to use to process the specified keypublic <R> Map<K,R> invokeAll(Collection<? extends K> collKeys, InvocableMap.EntryProcessor<K,V,R> agent)
invokeAll
in interface InvocableMap<K,V>
invokeAll
in class WrapperNamedCache<K,V>
R
- the type of value returned by the EntryProcessorcollKeys
- the keys to process; these keys are not required to
exist within the Mapagent
- the EntryProcessor to use to process the specified keyspublic <R> Map<K,R> invokeAll(Filter filter, InvocableMap.EntryProcessor<K,V,R> agent)
invokeAll
in interface InvocableMap<K,V>
invokeAll
in class WrapperNamedCache<K,V>
R
- the type of value returned by the EntryProcessorfilter
- a Filter that results in the set of keys to be
processedagent
- the EntryProcessor to use to process the specified keyspublic V put(K oKey, V oValue)
put
in interface CacheMap<K,V>
put
in interface ConcurrentMap<K,V>
put
in interface Map<K,V>
put
in class WrapperConcurrentMap<K,V>
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified keypublic V remove(Object oKey)
remove
in interface ConcurrentMap<K,V>
remove
in interface Map<K,V>
remove
in class WrapperConcurrentMap<K,V>
oKey
- key whose mapping is to be removed from the mappublic void clear()
public boolean lock(Object oKey, long cWait)
lock
in interface ConcurrentMap<K,V>
lock
in class WrapperConcurrentMap<K,V>
oKey
- key being lockedcWait
- the number of milliseconds to continue trying to obtain
a lock; pass zero to return immediately; pass -1 to block
the calling thread until the lock could be obtainedpublic boolean lock(Object oKey)
lock
in interface ConcurrentMap<K,V>
lock
in class WrapperConcurrentMap<K,V>
oKey
- key being lockedpublic boolean unlock(Object oKey)
unlock
in interface ConcurrentMap<K,V>
unlock
in class WrapperConcurrentMap<K,V>
oKey
- key being unlockedprotected boolean removeBlind(Object oKey)
removeBlind
in class WrapperConcurrentMap<K,V>
oKey
- key whose mapping is to be removed from the mapprotected void checkStrict()