Class BlockDiskElementDescriptor<K>
java.lang.Object
org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskElementDescriptor<K>
- All Implemented Interfaces:
- Externalizable,- Serializable
This represents an element on disk. This is used when we persist the keys. We only store the
 block addresses in memory. We don't need the length here, since all the blocks are the same size
 recycle bin.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructorBlockDiskElementDescriptor(K key, int[] blocks) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionint[]This holds the block numbers.getKey()voidreadExternal(ObjectInput input) Saves on reflection.voidsetBlocks(int[] blocks) voidtoString()For debugging.voidwriteExternal(ObjectOutput output) Saves on reflection.
- 
Constructor Details- 
BlockDiskElementDescriptorpublic BlockDiskElementDescriptor()Default constructor
- 
BlockDiskElementDescriptorConstructor- Parameters:
- key- the key
- blocks- the data
- Since:
- 3.1
 
 
- 
- 
Method Details- 
setKey- Parameters:
- key- The key to set.
 
- 
getKey- Returns:
- Returns the key.
 
- 
setBlocks- Parameters:
- blocks- The blocks to set.
 
- 
getBlocksThis holds the block numbers. An item my be dispersed between multiple blocks.- Returns:
- Returns the blocks.
 
- 
toStringFor debugging.
- 
readExternalSaves on reflection.(non-Javadoc) - Specified by:
- readExternalin interface- Externalizable
- Throws:
- IOException
- ClassNotFoundException
- See Also:
 
- 
writeExternalSaves on reflection.(non-Javadoc) - Specified by:
- writeExternalin interface- Externalizable
- Throws:
- IOException
- See Also:
 
 
-