Constructor and Description |
---|
TreeIndex(File directory,
String name,
IndexManager indexManager)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
clear the index
|
boolean |
containsKey(Object key) |
void |
delete()
delete all state associated with the index
|
StoreEntry |
get(Object key) |
int |
getKeySize() |
int |
getPageCacheSize() |
int |
getPageSize() |
int |
getSize()
return the size of the index
|
boolean |
isEnablePageCaching() |
boolean |
isTransient() |
void |
load()
load indexes
|
protected void |
openIndexFile() |
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 |
setPageCacheSize(int pageCacheSize) |
void |
setPageSize(int pageSize) |
void |
store(Object key,
StoreEntry value)
store the key, item
|
void |
unload()
unload indexes
|
public TreeIndex(File directory, String name, IndexManager indexManager) throws IOException
directory
- name
- indexManager
- IOException
public void setKeyMarshaller(Marshaller marshaller)
setKeyMarshaller
in interface Index
marshaller
- public int getKeySize()
public void setKeySize(int keySize)
keySize
- the keySize to setpublic int getPageSize()
public void setPageSize(int pageSize)
pageSize
- the pageSize to setpublic boolean isTransient()
isTransient
in interface Index
public boolean isEnablePageCaching()
public void setEnablePageCaching(boolean enablePageCaching)
enablePageCaching
- the enablePageCaching to setpublic int getPageCacheSize()
public void setPageCacheSize(int pageCacheSize)
pageCacheSize
- the pageCacheSize to setpublic void load()
Index
public void unload() throws IOException
Index
unload
in interface Index
IOException
public void store(Object key, StoreEntry value) throws IOException
Index
store
in interface Index
IOException
public StoreEntry get(Object key) throws IOException
get
in interface Index
IOException
public StoreEntry remove(Object key) throws IOException
Index
remove
in interface Index
IOException
public boolean containsKey(Object key) throws IOException
containsKey
in interface Index
IOException
public void clear() throws IOException
Index
clear
in interface Index
IOException
public void delete() throws IOException
Index
delete
in interface Index
IOException
protected void openIndexFile() throws IOException
IOException
Copyright © 2005–2017 The Apache Software Foundation. All rights reserved.