|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.kaha.impl.index.hash.HashIndex
public class HashIndex
BTree implementation
| Field Summary | |
|---|---|
static int |
DEFAULT_BIN_SIZE
|
static int |
DEFAULT_KEY_SIZE
|
static int |
DEFAULT_LOAD_FACTOR
|
static int |
DEFAULT_PAGE_SIZE
|
static int |
MAXIMUM_CAPACITY
|
| Constructor Summary | |
|---|---|
HashIndex(File directory,
String name,
IndexManager indexManager)
Constructor |
|
| Method Summary | |
|---|---|
void |
clear()
clear the index |
boolean |
containsKey(Object key)
|
void |
delete()
delete all state associated with the index |
StoreEntry |
get(Object key)
|
int |
getActiveBins()
|
int |
getKeySize()
|
int |
getLoadFactor()
|
int |
getMaximumCapacity()
|
int |
getNumberOfBins()
|
int |
getPageCacheSize()
|
int |
getPageSize()
|
int |
getSize()
return the size of the index |
int |
getThreshold()
|
boolean |
isEnablePageCaching()
|
boolean |
isTransient()
|
void |
load()
load indexes |
StoreEntry |
remove(Object key)
remove the index key |
void |
setEnablePageCaching(boolean enablePageCaching)
|
void |
setKeyMarshaller(Marshaller marshaller)
Set the marshaller for key objects |
void |
setKeySize(int keySize)
|
void |
setLoadFactor(int loadFactor)
|
void |
setMaximumCapacity(int maximumCapacity)
|
void |
setNumberOfBins(int numberOfBins)
|
void |
setPageCacheSize(int pageCacheSize)
|
void |
setPageSize(int pageSize)
|
void |
setThreshold(int threshold)
|
void |
store(Object key,
StoreEntry value)
store the key, item |
String |
toString()
|
void |
unload()
unload indexes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_PAGE_SIZE
public static final int DEFAULT_KEY_SIZE
public static final int DEFAULT_BIN_SIZE
public static final int MAXIMUM_CAPACITY
public static final int DEFAULT_LOAD_FACTOR
| Constructor Detail |
|---|
public HashIndex(File directory,
String name,
IndexManager indexManager)
throws IOException
directory - name - indexManager -
IOException| Method Detail |
|---|
public void setKeyMarshaller(Marshaller marshaller)
setKeyMarshaller in interface Indexmarshaller - public int getKeySize()
getKeySize in interface HashIndexMBeanpublic void setKeySize(int keySize)
setKeySize in interface HashIndexMBeankeySize - the keySize to setpublic int getPageSize()
getPageSize in interface HashIndexMBeanpublic void setPageSize(int pageSize)
pageSize - the pageSize to setpublic int getNumberOfBins()
getNumberOfBins in interface HashIndexMBeanpublic void setNumberOfBins(int numberOfBins)
numberOfBins - public boolean isEnablePageCaching()
isEnablePageCaching in interface HashIndexMBeanpublic void setEnablePageCaching(boolean enablePageCaching)
enablePageCaching - the enablePageCaching to setpublic int getPageCacheSize()
getPageCacheSize in interface HashIndexMBeanpublic void setPageCacheSize(int pageCacheSize)
pageCacheSize - the pageCacheSize to setpublic boolean isTransient()
isTransient in interface IndexisTransient in interface IndexMBeanpublic int getThreshold()
public void setThreshold(int threshold)
threshold - the threshold to setpublic int getLoadFactor()
public void setLoadFactor(int loadFactor)
loadFactor - the loadFactor to setpublic int getMaximumCapacity()
public void setMaximumCapacity(int maximumCapacity)
maximumCapacity - the maximumCapacity to setpublic int getSize()
Index
getSize in interface HashIndexMBeangetSize in interface IndexgetSize in interface IndexMBeanpublic int getActiveBins()
getActiveBins in interface HashIndexMBeanpublic void load()
Index
load in interface Index
public void unload()
throws IOException
Index
unload in interface IndexIOException
public void store(Object key,
StoreEntry value)
throws IOException
Index
store in interface IndexIOException
public StoreEntry get(Object key)
throws IOException
get in interface IndexIOException
public StoreEntry remove(Object key)
throws IOException
Index
remove in interface IndexIOException
public boolean containsKey(Object key)
throws IOException
containsKey in interface IndexIOException
public void clear()
throws IOException
Index
clear in interface IndexIOException
public void delete()
throws IOException
Index
delete in interface IndexIOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||