Package com.tangosol.io
Class AbstractBinaryStore
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.io.AbstractBinaryStore
-
- All Implemented Interfaces:
BinaryStore
- Direct Known Subclasses:
BerkeleyDBBinaryStore
public abstract class AbstractBinaryStore extends Base implements BinaryStore
Abstract implementation of the BinaryStore interface.- Author:
- cp 2003.05.30
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
Nested classes/interfaces inherited from interface com.tangosol.io.BinaryStore
BinaryStore.KeySetAware, BinaryStore.SizeAware
-
-
Constructor Summary
Constructors Constructor Description AbstractBinaryStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
erase(Binary binKey)
Remove the specified key from the underlying store if present.void
eraseAll()
Remove all data from the underlying store.static File
getDefaultDirectory()
Obtain a File object for the default directory to use for file storage.Iterator
keys()
Iterate all keys in the underlying store.abstract Binary
load(Binary binKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.void
store(Binary binKey, Binary binValue)
Store the specified value under the specific key in the underlying store.-
Methods inherited from class com.tangosol.util.Base
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, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, 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
-
-
-
-
Method Detail
-
load
public abstract Binary load(Binary binKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.- Specified by:
load
in interfaceBinaryStore
- Parameters:
binKey
- key whose associated value is to be returned- Returns:
- the value associated with the specified key, or null if no value is available for that key
-
store
public void store(Binary binKey, Binary binValue)
Store the specified value under the specific key in the underlying store. This method is intended to support both key/value creation and value update for a specific key.- Specified by:
store
in interfaceBinaryStore
- Parameters:
binKey
- key to store the value underbinValue
- value to be stored- Throws:
UnsupportedOperationException
- if this implementation or the underlying store is read-only
-
erase
public void erase(Binary binKey)
Remove the specified key from the underlying store if present.- Specified by:
erase
in interfaceBinaryStore
- Parameters:
binKey
- key whose mapping is to be removed from the map- Throws:
UnsupportedOperationException
- if this implementation or the underlying store is read-only
-
eraseAll
public void eraseAll()
Remove all data from the underlying store.- Specified by:
eraseAll
in interfaceBinaryStore
- Throws:
UnsupportedOperationException
- if this implementation or the underlying store is read-only
-
keys
public Iterator keys()
Iterate all keys in the underlying store.- Specified by:
keys
in interfaceBinaryStore
- Returns:
- a read-only iterator of the keys in the underlying store
- Throws:
UnsupportedOperationException
- if the underlying store is not iterable
-
getDefaultDirectory
public static File getDefaultDirectory()
Obtain a File object for the default directory to use for file storage. The default directory is defined by the "java.io.tmpdir" system property.- Returns:
- a File object representing the location of the default directory
-
-