public class SimpleSerializationMap extends AbstractKeyBasedMap
size() has to iterate through all the keys provided by the underlying BinaryStore, and containsKey(java.lang.Object) has to read the value from the underlying BinaryStore to prove its existence.AbstractKeyBasedMap.DeferredCacheEvent<K,V>, AbstractKeyBasedMap.EntrySet, AbstractKeyBasedMap.KeySet, AbstractKeyBasedMap.ValuesCollectionBase.LoggingWriter, Base.StackFrame| Constructor and Description |
|---|
SimpleSerializationMap(BinaryStore store)
Construct a SimpleSerializationMap on top of a BinaryStore.
|
SimpleSerializationMap(BinaryStore store, boolean fBinaryMap)
Construct a SimpleSerializationMap on top of a BinaryStore, optionally storing only Binary keys and values.
|
SimpleSerializationMap(BinaryStore store, ClassLoader loader)
Construct a SimpleSerializationMap on top of a BinaryStore, using the passed ClassLoader for deserialization.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all key/value mappings.
|
boolean |
containsKey(Object oKey)
Returns true if this map contains a mapping for the specified key.
|
boolean |
containsValue(Object oValue)
Returns true if this Map maps one or more keys to the specified value.
|
protected Object |
fromBinary(Binary bin)
Translate the passed Binary object into an Object object.
|
Object |
get(Object oKey)
Returns the value to which this map maps the specified key.
|
BinaryStore |
getBinaryStore()
Returns the BinaryStore that this map uses for its storage.
|
CacheStatistics |
getCacheStatistics()
Returns the CacheStatistics for this cache.
|
ClassLoader |
getClassLoader()
Returns the ClassLoader that this map uses for deserialization, if it has one.
|
boolean |
isBinaryMap()
Determine if the keys and values in this map are known to be all Binary.
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
protected Iterator |
iterateKeys()
Create an iterator over the keys in this Map.
|
Object |
put(Object oKey, Object oValue)
Associates the specified value with the specified key in this map.
|
void |
putAll(Map map)
Copies all of the mappings from the specified map to this map.
|
Object |
remove(Object oKey)
Removes the mapping for this key from this map if present.
|
protected boolean |
removeBlind(Object oKey)
Removes the mapping for this key from this map if present.
|
protected void |
setBinaryMap(boolean fBinary)
Configure the Map to be aware that all the keys and values in the map are known to be Binary or not.
|
protected void |
setBinaryStore(BinaryStore store)
Configures the BinaryStore that this map will use for its storage.
|
protected void |
setClassLoader(ClassLoader loader)
Configure the ClassLoader that this map will use for deserialization.
|
int |
size()
Returns the number of key-value mappings in this map.
|
protected Binary |
toBinary(Object o)
Translate the passed Object object into an Binary object.
|
String |
toString()
Returns a string representation of this Map.
|
clone, entrySet, equals, getAll, hashCode, instantiateEntrySet, instantiateKeySet, instantiateValues, keySet, valuesazzert, 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, 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, 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, waitfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic SimpleSerializationMap(BinaryStore store)
store - the BinaryStore to use to write the serialized objects topublic SimpleSerializationMap(BinaryStore store, ClassLoader loader)
store - the BinaryStore to use to write the serialized objects toloader - the ClassLoader to use for deserializationpublic SimpleSerializationMap(BinaryStore store, boolean fBinaryMap)
store - the BinaryStore to use to write the serialized objects tofBinaryMap - true indicates that this map will only manage binary keys and valuespublic void clear()
clear in interface Mapclear in class AbstractKeyBasedMappublic boolean containsKey(Object oKey)
containsKey in interface MapcontainsKey in class AbstractKeyBasedMappublic boolean containsValue(Object oValue)
containsValue in interface MapcontainsValue in class AbstractKeyBasedMappublic Object get(Object oKey)
get in interface Mapget in class AbstractKeyBasedMapoKey - the key objectpublic boolean isEmpty()
isEmpty in interface MapisEmpty in class AbstractKeyBasedMappublic Object put(Object oKey, Object oValue)
put in interface Mapput in class AbstractKeyBasedMapoKey - key with which the specified value is to be associatedoValue - value to be associated with the specified keypublic void putAll(Map map)
AbstractKeyBasedMap.put(K, V) on this map once for each mapping in the passed map. The behavior of this operation is unspecified if the passed map is modified while the operation is in progress.putAll in interface MapputAll in class AbstractKeyBasedMapmap - the Map containing the key/value pairings to put into this Mappublic Object remove(Object oKey)
remove in interface Mapremove in class AbstractKeyBasedMapoKey - key whose mapping is to be removed from the mappublic int size()
size in interface Mapsize in class AbstractKeyBasedMapprotected Iterator iterateKeys()
iterateKeys in class AbstractKeyBasedMapprotected boolean removeBlind(Object oKey)
removeBlind in class AbstractKeyBasedMapoKey - key whose mapping is to be removed from the mappublic String toString()
toString in class AbstractKeyBasedMappublic BinaryStore getBinaryStore()
Note: This implementation assumes that the BinaryStore is only being modified by this Map instance. If you modify the BinaryStore contents, the behavior of this Map is undefined.
protected void setBinaryStore(BinaryStore store)
store - the BinaryStore to usepublic ClassLoader getClassLoader()
protected void setClassLoader(ClassLoader loader)
loader - the ClassLoader that this map should use for deserializationpublic boolean isBinaryMap()
protected void setBinaryMap(boolean fBinary)
fBinary - pass true if all keys and values will be Binarypublic CacheStatistics getCacheStatistics()
protected Binary toBinary(Object o)
o - the Object to serialize into a Binary object