public class BlockDiskKeyStore
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
BlockDiskKeyStore.LRUMap
Class for recylcing and lru.
|
Constructor and Description |
---|
BlockDiskKeyStore(BlockDiskCacheAttributes cacheAttributes,
BlockDiskCache blockDiskCache)
Set the configuration options.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearMemoryMap()
This is mainly used for testing.
|
java.util.Set |
entrySet()
Gets the entry set.
|
int[] |
get(java.lang.Object key)
gets the object for the key.
|
java.util.Set |
keySet()
Gets the key set.
|
protected void |
loadKeys()
Loads the keys from the .key file.
|
void |
put(java.lang.Object key,
int[] value)
Puts a int[] in the keyStore.
|
int[] |
remove(java.lang.Object key)
Remove by key.
|
protected void |
reset()
Resets the file and creates a new key map.
|
protected void |
saveKeys()
Saves key file to disk.
|
int |
size()
Gets the size of the key hash.
|
public BlockDiskKeyStore(BlockDiskCacheAttributes cacheAttributes, BlockDiskCache blockDiskCache) throws java.lang.Exception
cacheAttributes
- blockDiskCache
- used for freeingjava.lang.Exception
protected void saveKeys()
protected void reset()
protected void clearMemoryMap()
protected void loadKeys() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.util.Set entrySet()
public java.util.Set keySet()
public int size()
public int[] get(java.lang.Object key)
key
- public void put(java.lang.Object key, int[] value)
key
- value
- public int[] remove(java.lang.Object key)
key
- Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.