|
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.Objectjava.util.AbstractMap
com.tangosol.io.nio.BinaryMap
public class BinaryMap
Implements the Map interface to store Binary objects using Java's NIO buffers.
The Buffer is used to hold blocks, which are either Entry or free blocks. Both share a common header: byte length type description ------ ---------- ------- ------------------------------------------- 0 1 integer type 1 4 integer offset of the next block in the Buffer 5 4 integer offset of the prev block in the Buffer 9 4 integer offset of the next entry in the list or -1=tail 13 4 integer offset of the prev entry in the list or -1=head The offset of the next block in the buffer provides the "length overall" (also known as LOA) of the block, such that a block located at offset "oCur" with a next block offset of "oNext" will have an LOA "l" of: l = oNext - oCur The additional structure for an Entry block is as follows: byte length type description ------ ---------- ------- ------------------------------------------- 17 4 integer hash code 21 4 integer key length (m) 25 m byte[] key 25+m 4 integer value length (n) 29+m n byte[] value 29+m+n l-(29+m+n) byte[] fill The reason for supporting "fill" is to allow an entry to shrink and grow a little bit in place, for example since a free block has a minimum size and if the entry is followed immediately by another entry and shrinks, it would have to be moved if it doesn't shrink at least 17 bytes. Similarly, an entry could be padded to allow it to grow slightly. The additional structure for a free block is as follows: byte length type description ------ ---------- ------- ------------------------------------------- 17 l-17 byte[] fill The Buffer is a packed list of blocks, and each block is either an Entry or a free block. Contiguous free blocks are automatically merged so that there are never any contiguous free blocks at the end of an operation. Entries are expected to be contiguously allocated; compaction is the act of copying Entry blocks so that they are contiguous. The BinaryMap manages an array of hash buckets that hold the offsets of the first Entry in the linked list of entries stored in the Buffer. The offset will be NIL (-1) if there are no entries in that bucket since 0 is a valid offset into the Buffer. Incremental compaction occurs only on modifications (puts and removes). For a put, the compaction occurs before the put is processed, and for a remove, it occurs after the remove is processed, to make it slightly more likely that a put will have adequate free space and that the removed entry would not have been relocated by compaction. The BinaryMap categorizes empty blocks based on their size: code free block size ---- ----------------------------------- 0 63 bytes or smaller 1 64 to 127 bytes 2 128 to 255 bytes 3 256 to 511 bytes 4 512 to 1023 bytes 5 1024 to 2047 bytes 6 2048 to 4095 bytes 7 4096 to 8191 bytes 8 8192 to 16383 bytes 9 16384 to 32767 bytes 10 32768 to 65535 bytes 11 65536 to 131071 bytes 12 131072 to 262143 bytes 13 262144 to 524287 bytes 14 524288 to 1048575 bytes 15 1048576 to 2097151 bytes 16 2097152 to 4194303 bytes 17 4194304 to 8388607 bytes 18 8388608 to 16777215 bytes 19 16777216 to 33554431 bytes 20 33554432 to 67108863 bytes 21 67108864 to 134217727 bytes 22 134217728 to 268435455 bytes 23 268435456 to 536870911 bytes 24 536870912 to 1073741823 bytes 25 1073741824 to 2147483647 bytes For each category of free blocks, the BinaryMap maintains a linked list of free blocks that fit that category. To determine the size of a block in bytes, use the length() method. To calculate the code of a block, use the getSizeCode() method, or the static calculateSizeCode(int) method of BinaryMap. To open an existing block at a certain offset, use the method openBlock(int). To create and open a block at a certain offset, use the method initBlock(int). To allocate and open a free block of a certain size, use the method allocateBlock(int). An opened block should always be closed using the method Block.close(), which commits pending changes to the underlying buffer. The only time that a block should not be closed is when the block is being destroyed (e.g. when a free block is merged with another free block); in this case, use the method Block.discard(). To merge free blocks that occur before and/or after a specific free block, use the method Block.merge(). To split a free block into two contiguous free blocks, use the method Block.split(int). To remove a block from its linked list, use Block.unlink(). Unless the block is being destroyed, it should be re-linked using the Block.link() method.
Nested Class Summary | |
---|---|
class |
BinaryMap.Block
A Block is the unit of storage within a Buffer. |
static class |
BinaryMap.Entry
A map entry (key-value pair). |
class |
BinaryMap.EntrySet
A set of entries backed by this map. |
protected class |
BinaryMap.KeySet
A set of entries backed by this map. |
protected class |
BinaryMap.ValuesCollection
A collection of values backed by this map. |
Field Summary | |
---|---|
protected static int[] |
BUCKET_COUNTS
These are potential bucket counts. |
static double |
DEFAULT_MAXLOADFACTOR
Default value for the percentage of the modulo that the entry count must reach before going to the next bucket level. |
static double |
DEFAULT_MINLOADFACTOR
Default value for the percentage of the next lower bucket level's modulo that the entry count must drop to before reverting to the next lower bucket level. |
protected static byte[] |
FILL_BUFFER
Byte array used for wiping the buffer. |
protected static byte |
FILL_BYTE
Byte used as a fill byte. |
protected BinaryMap.ValuesCollection |
m_colValues
The collection of values backed by this map. |
protected BinaryMap.EntrySet |
m_set
The set of entries backed by this map. |
protected BinaryMap.KeySet |
m_setKeys
The set of keys backed by this map. |
protected static int |
MAX_OPEN_BLOCKS
Maximum number of simultaneously open blocks to support. |
protected static int |
MAX_SIZE_CODES
Number of size codes for free blocks. |
protected static boolean |
MODE_DEBUG
True to enable debug mode. |
protected static int |
NIL
Offset reserved for the "does-not-exist" block. |
protected static int |
SIZE_COPY_BUFFER
Copy buffer size. |
Constructor Summary | |
---|---|
protected |
BinaryMap()
Construct a BinaryMap. |
|
BinaryMap(ByteBuffer buffer)
Construct a BinaryMap on a specific buffer with the default modulo growth and shrinkage (load factor) settings. |
|
BinaryMap(ByteBuffer buffer,
double dflMaxLoadFactor,
double dflMinLoadFactor,
boolean fStrict)
Construct a BinaryMap on a specific buffer with the specified modulo growth and shrinkage (load factor) settings. |
|
BinaryMap(ByteBufferManager bufmgr)
Construct a BinaryMap using a buffer from the specified ByteBufferManager, and using the default modulo growth and shrinkage (load factor) settings. |
|
BinaryMap(ByteBufferManager bufmgr,
double dflMaxLoadFactor,
double dflMinLoadFactor,
boolean fStrict)
Construct a BinaryMap using a buffer from the specified ByteBufferManager, and using the specified modulo growth and shrinkage (load factor) settings. |
Method Summary | |
---|---|
protected void |
adjustOpenBlockOffset(int ofOld,
int ofNew)
When an open block changes position in the buffer, this method is invoked to adjust the cache of open blocks. |
protected BinaryMap.Block |
allocateBlock(int cb)
Allocate a free Block object of at least a certain size. |
protected static Binary |
bin(String s)
Internal debugging support: Turn a String into a Binary. |
protected static void |
buffercopy(ByteBuffer buffer,
int ofCopyFrom,
int ofCopyTo,
int cbCopy,
byte[] abBuf)
Copy from one part of the buffer to another. |
protected int |
calculateBucket(int nHash)
Calculate the bucket for the specified hash code. |
protected int |
calculatePreviousBucket(int nHash)
Calculate the old bucket for the specified hash code. |
protected static int |
calculateSizeCode(int cbBlock)
Determine which "free bucket" a block of a particular size would go into. |
void |
check(String sDesc)
Debugging support: Validate the buffer's data structures, the hash buckets, free lists, etc. |
protected void |
checkBufferGrow(int cbAdditional)
If there is a buffer manager, check if the current buffer should be grown. |
protected void |
checkBufferShrink()
If there is a buffer manager, check if the current buffer should be shrunk. |
protected void |
checkModulo()
Determine if the modulo should be changed. |
void |
clear()
Removes all mappings from this map. |
protected void |
clearBucketOffsets()
Clear out all references in the array of hash buckets. |
protected void |
clearBucketOffsets(int nBucket)
Clear out all references in the array of hash buckets starting with the specified bucket. |
protected void |
clearBuffer()
Create one big free block in the buffer. |
protected void |
clearFreeLists()
Clear out all references in the array of free lists. |
protected void |
compactAll()
Full linear compaction of the buffer. |
protected void |
compactBegin()
Configure the incremental compact. |
protected void |
compactComplete()
Complete the incremental compact. |
protected void |
compactNext()
Perform an incremental compaction of the next block. |
protected void |
compactUntil(int cbReqFree)
Perform an an incremental compact at the specified block. |
boolean |
containsKey(Object oKey)
Returns true if this map contains a mapping for the specified key. |
void |
dump()
Debugging support: Dump the inner structures of the BinaryMap to stdout. |
Set |
entrySet()
Returns a set view of the mappings contained in this map. |
protected BinaryMap.Block |
findEntryBlock(Binary binKey)
Find the Entry block with the specified key. |
protected static String |
formatIndex(int n)
Format an index to a String. |
protected static String |
formatOffset(int of)
Format an offset to a String. |
protected static String |
formatOffsetArray(int[] an)
Format an array of offsets to be readable in a dump. |
Object |
get(Object oKey)
Returns the value to which this map maps the specified key. |
protected int |
getBucketCount()
Determine the number of hash buckets. |
protected int |
getBucketLevel()
Determine the hash bucket level. |
protected int |
getBucketOffset(int nBucket)
Get the first Entry block in the linked list of Entry blocks that fall into a certain hash bucket. |
protected ByteBuffer |
getBuffer()
Obtain the ByteBuffer that the BinaryMap is backed by. |
protected DataInputStream |
getBufferInput()
Get the DataInputStream that maps to the underlying ByteBuffer. |
ByteBufferManager |
getBufferManager()
Obtain the ByteBufferManager that provides the ByteBuffer objects. |
protected DataOutputStream |
getBufferOutput()
Get the DataOutputStream that maps to the underlying ByteBuffer. |
protected int |
getCapacity()
Determine the capacity of the map in bytes. |
int |
getEntryBlockCount()
Returns the number of entry blocks. |
protected int |
getFreeBlockOffset(int nCode)
Get the first free block in the linked list of free blocks that have a certain size code. |
protected int |
getFreeCapacity()
Determine the free capacity of the map in bytes. |
protected int |
getFreeListCount()
Determine the number of free lists (ie the number of size codes). |
protected int |
getGrowthCount()
Determine the level at which the modulo will increase. |
protected int |
getLastBlockOffset()
Get the offset of the last block in the buffer. |
protected double |
getMaxLoadFactor()
Determine the load factor for the map. |
protected double |
getMinLoadFactor()
Determine the "unload factor" for the map. |
protected int |
getModulo()
Determine the current modulo. |
protected int |
getNextCompactBlock()
Determine the next block to compact. |
protected int |
getNextRehashBucket()
Determine the next bucket to rehash. |
protected int |
getPreviousModulo()
Determine the previous modulo. |
protected int |
getShrinkageCount()
Determine the level at which the modulo will decrease. |
protected int |
getUsedCapacity()
Determine the number of types in the buffer that are in use by Entry blocks. |
protected BinaryMap.Block |
grabBlock(int ofBlock)
Grab a block object for the specified offset. |
protected BinaryMap.Block |
initBlock(int of)
Obtain a Block object for a new block that will be located at the specified offset in the ByteBuffer. |
protected void |
initializeBuckets()
Create an initial array of hash buckets. |
protected void |
initializeFreeLists()
Create an array of references to lists of free blocks indexed by size code. |
protected BinaryMap.Block |
instantiateBlock()
Factory method: Create a Block object. |
protected BinaryMap.Entry |
instantiateEntry(Binary binKey,
Binary binValue)
Factory pattern: Instantiate an Entry object. |
protected BinaryMap.EntrySet |
instantiateEntrySet()
Factory pattern. |
protected BinaryMap.KeySet |
instantiateKeySet()
Factory pattern. |
protected BinaryMap.ValuesCollection |
instantiateValuesCollection()
Factory pattern. |
protected boolean |
isCompacting()
Determine if the map is incrementally compacting. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
protected boolean |
isRehashing()
Determine if the map is incrementally rehashing. |
protected boolean |
isStrict()
Determine if the buffer should be initialized and if blocks should be cleared when not in use. |
Set |
keySet()
Returns a Set view of the keys contained in this map. |
static void |
main(String[] asArg)
Debugging support: Command line test. |
protected BinaryMap.Block |
openBlock(int of)
Obtain a Block object for the block located at the specified offset in the ByteBuffer. |
Object |
put(Object oKey,
Object oValue)
Associates the specified value with the specified key in this map. |
protected void |
recycleBlock(BinaryMap.Block block)
Release (recycle) the specified Block object. |
protected void |
rehash(int nBucket)
Rehash the specified bucket such that, when done, it will only contain keys that hash to it with the current modulo. |
protected void |
rehashAll()
Rehash all blocks such that no block will be linked into the wrong bucket. |
protected void |
rehashBegin()
Configure the incremental rehash. |
protected void |
rehashComplete()
Complete the incremental rehash. |
protected void |
rehashNext()
Rehash the next incremental rehash block. |
Object |
remove(Object oKey)
Removes the mapping for this key from this map if present. |
protected RuntimeException |
reportOutOfMemory(int cbRequired)
Report on an insufficient memory problem. |
protected void |
setBucketCount(int cBuckets)
Configure the number of hash buckets. |
protected void |
setBucketLevel(int nLevel)
Configure the hash bucket level. |
protected void |
setBucketOffset(int nBucket,
int ofBlock)
Set the head of the hash bucket linked list for a certain bucket. |
protected void |
setBuffer(ByteBuffer buffer)
Specify the ByteBuffer that the BinaryMap will be backed by. |
protected void |
setBufferManager(ByteBufferManager bufmgr)
Specify the ByteBufferManager for this map. |
protected void |
setFreeBlockOffset(int nCode,
int ofBlock)
Set the head of the free block linked list for a certain size code. |
protected void |
setGrowthCount(int cEntries)
Set the level at which the modulo will increase. |
protected void |
setLastBlockOffset(int ofBlock)
Set the offset of the last block in the buffer. |
protected void |
setMaxLoadFactor(double dflPercent)
Set the load factor. |
protected void |
setMinLoadFactor(double dflPercent)
Set the "unload factor". |
protected void |
setModulo(int nModulo)
Set the new modulo. |
protected void |
setNextCompactBlock(int ofBlock)
Set the next block to compact. |
protected void |
setNextRehashBucket(int nBucket)
Set the next bucket to rehash. |
protected void |
setPreviousModulo(int nModulo)
Set the old modulo. |
protected void |
setShrinkageCount(int cEntries)
Set the level at which the modulo will decrease. |
protected void |
setStrict(boolean fStrict)
Specify if the buffer should be initialized and if blocks should be cleared when not in use. |
int |
size()
Returns the number of key-value mappings in this map. |
protected static String |
str(Object bin)
Internal debugging support: Turn a Binary into a String. |
protected Object[] |
toArray(Object[] ao,
Converter conv)
Returns an array with a runtime type is that of the specified array and that contains data from all of the entries in this Map. |
protected RuntimeException |
validateEntry(Object key,
Object value,
RuntimeException e)
If the passed key and/or value is not a Binary object, then throw an exception to specify that the key is not Binary, otherwise throw the original exception. |
protected RuntimeException |
validateKey(Object key,
RuntimeException e)
If the passed key is not Binary, then throw an exception to specify that the key is not Binary, otherwise throw the original exception. |
Collection |
values()
Returns a collection view of the values contained in this map. |
protected void |
wipe(int of,
int cb)
Wipe a portion of the buffer. |
Methods inherited from class java.util.AbstractMap |
---|
clone, containsValue, equals, hashCode, putAll, toString |
Field Detail |
---|
protected static final boolean MODE_DEBUG
protected static final byte FILL_BYTE
protected static final byte[] FILL_BUFFER
protected static final int MAX_SIZE_CODES
protected static final int[] BUCKET_COUNTS
protected static final int SIZE_COPY_BUFFER
protected static final int NIL
protected static final int MAX_OPEN_BLOCKS
public static final double DEFAULT_MAXLOADFACTOR
public static final double DEFAULT_MINLOADFACTOR
protected transient BinaryMap.EntrySet m_set
protected transient BinaryMap.KeySet m_setKeys
protected transient BinaryMap.ValuesCollection m_colValues
Constructor Detail |
---|
public BinaryMap(ByteBuffer buffer)
buffer
- the ByteBuffer that the map will store its data inpublic BinaryMap(ByteBuffer buffer, double dflMaxLoadFactor, double dflMinLoadFactor, boolean fStrict)
buffer
- the ByteBuffer that the map will store its
data indflMaxLoadFactor
- the percentage of the ratio of keys to the
modulo at which the modulo will increase;
for example, 0.9 implies that the modulo
will grow when the number of keys reaches
90% of the modulo valuedflMinLoadFactor
- the percentage of the ratio of keys to the
next lower modulo at which the modulo will
decrease; this value must be less than the
maximum load factor valuefStrict
- true to enable the strict (clean buffer)
option, which will degrade performance
slightlypublic BinaryMap(ByteBufferManager bufmgr)
bufmgr
- the ByteBufferManager that is responsible for providing
and managing the ByteBufferpublic BinaryMap(ByteBufferManager bufmgr, double dflMaxLoadFactor, double dflMinLoadFactor, boolean fStrict)
bufmgr
- the ByteBufferManager that is responsible for providing
and managing the ByteBufferdflMaxLoadFactor
- the percentage of the ratio of keys to the
modulo at which the modulo will increase;
for example, 0.9 implies that the modulo
will grow when the number of keys reaches
90% of the modulo valuedflMinLoadFactor
- the percentage of the ratio of keys to the
next lower modulo at which the modulo will
decrease; this value must be less than the
maximum load factor valuefStrict
- true to enable the strict (clean buffer)
option, which will degrade performance
slightlyprotected BinaryMap()
Method Detail |
---|
public int size()
size
in interface Map
size
in class AbstractMap
public boolean isEmpty()
isEmpty
in interface Map
isEmpty
in class AbstractMap
public boolean containsKey(Object oKey)
containsKey
in interface Map
containsKey
in class AbstractMap
oKey
- key whose presence in this map is to be tested
public Object get(Object oKey)
get
in interface Map
get
in class AbstractMap
oKey
- key whose associated value is to be returned
public Object put(Object oKey, Object oValue)
put
in interface Map
put
in class AbstractMap
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified key
public Object remove(Object oKey)
remove
in interface Map
remove
in class AbstractMap
oKey
- key whose mapping is to be removed from the map
public void clear()
clear
in interface Map
clear
in class AbstractMap
public Set entrySet()
entrySet
in interface Map
entrySet
in class AbstractMap
public Set keySet()
keySet
in interface Map
keySet
in class AbstractMap
public Collection values()
values
in interface Map
values
in class AbstractMap
public int getEntryBlockCount()
protected BinaryMap.Block findEntryBlock(Binary binKey)
binKey
- the Binary key object
protected Object[] toArray(Object[] ao, Converter conv)
ao
- the array into which the data from the map entires are to
be stored, if it is big enough; otherwise, a new array of
the same runtime type is allocated for this purposeconv
- an object that converts a Block object into either a key,
entry or value, depending on the collection which is
delegating to this method
ArrayStoreException
- if the runtime type of the specified
array is not a supertype of the runtime type required to
hold the keys, entries or valuesprotected RuntimeException validateKey(Object key, RuntimeException e)
key
- the object that should be of type Binarye
- the original RuntimeException
RuntimeException
- this method always throws some form of
RuntimeExceptionprotected RuntimeException validateEntry(Object key, Object value, RuntimeException e)
key
- the key object that should be of type Binaryvalue
- the value object that should be of type Binarye
- the original RuntimeException
RuntimeException
- this method always throws some form of
RuntimeExceptionprotected RuntimeException reportOutOfMemory(int cbRequired)
cbRequired
- the amount of space required
RuntimeException
- this method always throws some form of
RuntimeExceptionprotected BinaryMap.EntrySet instantiateEntrySet()
protected BinaryMap.KeySet instantiateKeySet()
protected BinaryMap.ValuesCollection instantiateValuesCollection()
protected BinaryMap.Entry instantiateEntry(Binary binKey, Binary binValue)
binKey
- a Binary object for the keybinValue
- a Binary object for the value
public ByteBufferManager getBufferManager()
protected void setBufferManager(ByteBufferManager bufmgr)
bufmgr
- the ByteBufferManager object (or null)protected void checkBufferGrow(int cbAdditional)
cbAdditional
- the number of bytes pending to be allocated
in addition to the bytes currently usedprotected void checkBufferShrink()
protected ByteBuffer getBuffer()
protected void setBuffer(ByteBuffer buffer)
buffer
- the new ByteBuffer objectprotected int getCapacity()
protected int getFreeCapacity()
protected int getUsedCapacity()
protected int getLastBlockOffset()
protected void setLastBlockOffset(int ofBlock)
ofBlock
- the offset of the last block in the bufferprotected boolean isStrict()
protected void setStrict(boolean fStrict)
fStrict
- pass true to always initialize unused portions of the
buffer (which is slower but hides unused data)protected void clearBuffer()
protected DataInputStream getBufferInput()
protected DataOutputStream getBufferOutput()
protected void wipe(int of, int cb)
of
- the offset into the buffer to wipe atcb
- the number of bytes to wipepublic void check(String sDesc)
sDesc
- a description of what is going on when this is calledpublic static void main(String[] asArg)
asArg
- command line argumentspublic void dump()
protected static String formatIndex(int n)
n
- the index that (may be NIL)
protected static String formatOffset(int of)
of
- the offset that (may be NIL)
protected static String formatOffsetArray(int[] an)
an
- the array of offsets
protected static Binary bin(String s)
s
- a String (not null)
protected static String str(Object bin)
bin
- a Binary object or null
protected void initializeFreeLists()
protected void clearFreeLists()
protected int getFreeListCount()
protected int getFreeBlockOffset(int nCode)
nCode
- the free block size code
protected void setFreeBlockOffset(int nCode, int ofBlock)
nCode
- the free block size codeofBlock
- the offset of the first free block of that size code
or NILprotected void initializeBuckets()
protected int getBucketLevel()
protected void setBucketLevel(int nLevel)
nLevel
- the new hash bucket levelprotected int getBucketCount()
protected void setBucketCount(int cBuckets)
cBuckets
- the new number of hash bucketsprotected int getBucketOffset(int nBucket)
nBucket
- the bucket number
protected void setBucketOffset(int nBucket, int ofBlock)
nBucket
- the bucket numberofBlock
- the offset of the first Entry block in that bucket,
or NILprotected double getMaxLoadFactor()
protected void setMaxLoadFactor(double dflPercent)
dflPercent
- the new load factorprotected double getMinLoadFactor()
protected void setMinLoadFactor(double dflPercent)
dflPercent
- the new "unload factor"protected int getGrowthCount()
protected void setGrowthCount(int cEntries)
cEntries
- the number of entries at which the modulo will growprotected int getShrinkageCount()
protected void setShrinkageCount(int cEntries)
cEntries
- the number of entries at which the modulo will shrinkprotected int getModulo()
protected void setModulo(int nModulo)
nModulo
- the new moduloprotected int getPreviousModulo()
protected void setPreviousModulo(int nModulo)
nModulo
- the previous moduloprotected int calculateBucket(int nHash)
nHash
- the hash code for the key
protected int calculatePreviousBucket(int nHash)
nHash
- the hash code for the key
protected void clearBucketOffsets()
protected void clearBucketOffsets(int nBucket)
protected void checkModulo()
protected boolean isRehashing()
protected int getNextRehashBucket()
protected void setNextRehashBucket(int nBucket)
nBucket
- the next bucket to rehashprotected void rehashBegin()
protected void rehash(int nBucket)
nBucket
- the bucket index to rehashprotected void rehashNext()
protected void rehashAll()
protected void rehashComplete()
protected BinaryMap.Block initBlock(int of)
protected BinaryMap.Block openBlock(int of)
protected BinaryMap.Block allocateBlock(int cb)
cb
- the required block size
protected boolean isCompacting()
protected int getNextCompactBlock()
protected void setNextCompactBlock(int ofBlock)
ofBlock
- the next block to compactprotected void compactBegin()
protected void compactUntil(int cbReqFree)
cbReqFree
- the number of bytes required to be freeprotected void compactNext()
protected void compactAll()
protected void compactComplete()
protected BinaryMap.Block grabBlock(int ofBlock)
ofBlock
- the offset of the block to grab
protected void adjustOpenBlockOffset(int ofOld, int ofNew)
ofOld
- the old offset of the blockofNew
- the new offset of the blockprotected void recycleBlock(BinaryMap.Block block)
block
- the Block object to releaseprotected static void buffercopy(ByteBuffer buffer, int ofCopyFrom, int ofCopyTo, int cbCopy, byte[] abBuf)
buffer
- the ByteBuffer containing the data to copyofCopyFrom
- the source offset into the ByteBufferofCopyTo
- the destination offset into the ByteBuffercbCopy
- the number of bytes to copyabBuf
- a temporary byte array available for useprotected static int calculateSizeCode(int cbBlock)
cbBlock
- the size of the block
protected BinaryMap.Block instantiateBlock()
|
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 |