|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.AbstractKeyBasedMap
com.tangosol.util.AbstractKeySetBasedMap
com.tangosol.util.WrapperObservableMap
com.tangosol.util.WrapperConcurrentMap
com.tangosol.net.cache.WrapperNamedCache
com.tangosol.net.cache.ReadonlyNamedCache
public class ReadonlyNamedCache
A simple extension of the WrapperNamedCache implementation that shields all content mutating operations such as put(), remove(), lock() etc.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.util.WrapperConcurrentMap |
---|
WrapperConcurrentMap.Lock |
Nested classes/interfaces inherited from class com.tangosol.util.WrapperObservableMap |
---|
WrapperObservableMap.InternalListener |
Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeySetBasedMap |
---|
AbstractKeySetBasedMap.EntrySet, AbstractKeySetBasedMap.KeyIterator, AbstractKeySetBasedMap.KeySet, AbstractKeySetBasedMap.ValuesCollection |
Nested classes/interfaces inherited from interface com.tangosol.util.QueryMap |
---|
QueryMap.Entry |
Nested classes/interfaces inherited from interface com.tangosol.util.InvocableMap |
---|
InvocableMap.Entry, InvocableMap.EntryAggregator, InvocableMap.EntryProcessor, InvocableMap.ParallelAwareAggregator |
Field Summary | |
---|---|
protected boolean |
m_fStrict
Specifies whether or not the "read-only" nature of this NamedCache is strictly enforced. |
Fields inherited from class com.tangosol.net.cache.WrapperNamedCache |
---|
m_service, m_sName |
Fields inherited from class com.tangosol.util.WrapperConcurrentMap |
---|
m_cWaitMillis, m_fEnforceLocking, m_gateMap, m_mapLock |
Fields inherited from class com.tangosol.util.WrapperObservableMap |
---|
m_listenerInternal, m_listenerSupport, m_map, m_stats |
Fields inherited from interface com.tangosol.net.cache.CacheMap |
---|
EXPIRY_DEFAULT, EXPIRY_NEVER |
Fields inherited from interface com.tangosol.util.ConcurrentMap |
---|
LOCK_ALL |
Constructor Summary | |
---|---|
ReadonlyNamedCache(Map map,
String sName,
boolean fStrict)
Construct a NamedCache wrapper based on the specified map. |
|
ReadonlyNamedCache(NamedCache cache,
boolean fStrict)
Construct a NamedCache wrapper based on the specified map. |
Method Summary | |
---|---|
protected void |
checkStrict()
Enforce the "strict" read-only policy. |
void |
clear()
Should not be called. |
void |
destroy()
Should not be called. |
Object |
invoke(Object oKey,
InvocableMap.EntryProcessor agent)
Should not be called. |
Map |
invokeAll(Collection collKeys,
InvocableMap.EntryProcessor agent)
Should not be called. |
Map |
invokeAll(Filter filter,
InvocableMap.EntryProcessor agent)
Should not be called. |
boolean |
lock(Object oKey)
Should not be called. |
boolean |
lock(Object oKey,
long cWait)
Should not be called. |
Object |
put(Object oKey,
Object oValue)
Should not be called. |
void |
putAll(Map map)
Should not be called. |
Object |
remove(Object oKey)
Should not be called. |
protected boolean |
removeBlind(Object oKey)
Should not be called. |
boolean |
unlock(Object oKey)
Should not be called. |
Methods inherited from class com.tangosol.net.cache.WrapperNamedCache |
---|
addIndex, aggregate, aggregate, entrySet, entrySet, getAll, getCacheName, getCacheService, isActive, keySet, put, release, removeIndex |
Methods inherited from class com.tangosol.util.WrapperConcurrentMap |
---|
getDescription, getLockDescription, getWaitMillis, instantiateLock, isInternalKeySetIteratorMutable, isLockingEnforced, setLockingEnforced, setWaitMillis, toString |
Methods inherited from class com.tangosol.util.WrapperObservableMap |
---|
addMapListener, addMapListener, addMapListener, containsValue, dispatchEvent, dispatchPendingEvent, get, getCacheStatistics, getInternalKeySet, getMap, getMapListenerSupport, hasListeners, instantiateInternalListener, isCollectStats, isEventFabricator, isSynthetic, isTranslateEvents, removeMapListener, removeMapListener, removeMapListener, setCollectStats, setTranslateEvents |
Methods inherited from class com.tangosol.util.AbstractKeySetBasedMap |
---|
containsKey, instantiateEntrySet, instantiateKeyIterator, instantiateKeySet, instantiateValues, isEmpty, iterateKeys, size |
Methods inherited from class com.tangosol.util.AbstractKeyBasedMap |
---|
clone, entrySet, equals, hashCode, keySet, values |
Methods inherited from interface com.tangosol.util.ConcurrentMap |
---|
containsKey, containsValue, get, isEmpty, size |
Field Detail |
---|
protected boolean m_fStrict
Constructor Detail |
---|
public ReadonlyNamedCache(NamedCache cache, boolean fStrict)
cache
- the NamedCache object that will be wrapped by this
read-only wrapperfStrict
- if true, calls to mutating opearations will throw
the UnsupportedOpearionException; otherwise those calls
will have no effect whatsoeverpublic ReadonlyNamedCache(Map 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 opearations will throw
the UnsupportedOpearionException; otherwise those calls
will have no effect whatsoeverMethod Detail |
---|
public void destroy()
destroy
in interface NamedCache
destroy
in class WrapperNamedCache
CacheService.destroyCache(NamedCache)
public Object invoke(Object oKey, InvocableMap.EntryProcessor agent)
invoke
in interface InvocableMap
invoke
in class WrapperNamedCache
oKey
- the key to process; it is not required to exist within
the Mapagent
- the EntryProcessor to use to process the specified key
public Map invokeAll(Collection collKeys, InvocableMap.EntryProcessor agent)
invokeAll
in interface InvocableMap
invokeAll
in class WrapperNamedCache
collKeys
- the keys to process; these keys are not required to
exist within the Mapagent
- the EntryProcessor to use to process the specified keys
public Map invokeAll(Filter filter, InvocableMap.EntryProcessor agent)
invokeAll
in interface InvocableMap
invokeAll
in class WrapperNamedCache
filter
- a Filter that results in the set of keys to be processedagent
- the EntryProcessor to use to process the specified keys
public Object put(Object oKey, Object oValue)
put
in interface CacheMap
put
in interface ConcurrentMap
put
in interface Map
put
in class WrapperConcurrentMap
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified key
public void putAll(Map map)
putAll
in interface ConcurrentMap
putAll
in interface Map
putAll
in class WrapperConcurrentMap
map
- the Map containing the key/value pairings to put into this
Mappublic Object remove(Object oKey)
remove
in interface ConcurrentMap
remove
in interface Map
remove
in class WrapperConcurrentMap
oKey
- key whose mapping is to be removed from the map
public void clear()
clear
in interface ConcurrentMap
clear
in interface Map
clear
in class WrapperConcurrentMap
public boolean lock(Object oKey, long cWait)
lock
in interface ConcurrentMap
lock
in class WrapperConcurrentMap
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 obtained
public boolean lock(Object oKey)
lock
in interface ConcurrentMap
lock
in class WrapperConcurrentMap
oKey
- key being locked
public boolean unlock(Object oKey)
unlock
in interface ConcurrentMap
unlock
in class WrapperConcurrentMap
oKey
- key being unlocked
protected boolean removeBlind(Object oKey)
removeBlind
in class WrapperConcurrentMap
oKey
- key whose mapping is to be removed from the map
protected void checkStrict()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |