public final class MapContainerImpl extends BaseContainerImpl implements MapContainer
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
directory |
protected Index |
index |
protected Marshaller |
keyMarshaller |
protected Marshaller |
valueMarshaller |
closed, containerId, dataManager, indexList, indexManager, initialized, loaded, persistentIndex, root| Constructor and Description |
|---|
MapContainerImpl(java.io.File directory,
ContainerId id,
IndexItem root,
IndexManager indexManager,
DataManager dataManager,
boolean persistentIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
empty the container
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object o) |
void |
delete()
Clean up all state associated with this container.
|
java.util.Set |
entrySet() |
java.lang.Object |
get(java.lang.Object key)
Get the value associated with the key
|
StoreEntry |
getEntry(java.lang.Object key)
Get the StoreEntry associated with the key
|
StoreEntry |
getFirst()
Get the StoreEntry for the first value in the Map
|
int |
getIndexBinSize() |
int |
getIndexKeySize() |
int |
getIndexLoadFactor() |
int |
getIndexMaxBinSize() |
IndexMBean |
getIndexMBean() |
int |
getIndexPageSize() |
protected IndexLinkedList |
getItemList() |
java.lang.Object |
getKey(StoreEntry item)
Get the Key object from it's location
|
StoreEntry |
getLast()
Get the StoreEntry for the last value item of the Map
|
StoreEntry |
getNext(StoreEntry entry)
Get the next StoreEntry value from the map
|
StoreEntry |
getPrevious(StoreEntry entry)
Get the previous StoreEntry from the map
|
java.lang.Object |
getValue(StoreEntry item)
Get the value from it's location
|
void |
init() |
boolean |
isEmpty() |
java.util.Set |
keySet() |
void |
load()
The container is created or retrieved in an unloaded state.
|
StoreEntry |
place(java.lang.Object key,
java.lang.Object value)
Add an entry to the Store Map
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Add an entry
|
void |
putAll(java.util.Map t)
Add add entries in the supplied Map
|
StoreEntry |
refresh(StoreEntry entry)
It's possible that a StoreEntry could be come stale this will return an
upto date entry for the StoreEntry position
|
protected void |
remove(IndexItem item) |
java.lang.Object |
remove(java.lang.Object key)
remove an entry associated with the key
|
void |
remove(StoreEntry entry)
Remove an Entry from ther Map
|
boolean |
removeValue(java.lang.Object o) |
void |
setIndexBinSize(int indexBinSize)
Set the index bin size
|
void |
setIndexKeySize(int indexKeySize)
Add the index key size
|
void |
setIndexLoadFactor(int loadFactor) |
void |
setIndexMaxBinSize(int maxBinSize)
set the meximum bin size
|
void |
setIndexPageSize(int indexPageSize)
Set the index page size
|
void |
setKeyMarshaller(Marshaller keyMarshaller)
For homogenous containers can set a custom marshaller for loading keys
The default uses Object serialization
|
void |
setValueMarshaller(Marshaller valueMarshaller)
For homogenous containers can set a custom marshaller for loading values
The default uses Object serialization
|
int |
size() |
java.lang.String |
toString() |
void |
unload()
unload indexes from the container
|
java.util.Collection |
values() |
protected IndexItem |
write(java.lang.Object key,
java.lang.Object value) |
checkClosed, close, delete, doClear, expressDataInterest, getContainerId, getDataManager, getId, getIndexManager, getInternalList, getList, isLoaded, isRoot, setList, storeIndex, updateIndexesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetId, isLoadedprotected Marshaller keyMarshaller
protected Marshaller valueMarshaller
protected java.io.File directory
public MapContainerImpl(java.io.File directory, ContainerId id, IndexItem root, IndexManager indexManager, DataManager dataManager, boolean persistentIndex)
public void init()
init in class BaseContainerImplpublic void load()
MapContainerload in interface MapContainerload in class BaseContainerImplpublic void unload()
MapContainerunload in interface MapContainerunload in class BaseContainerImplpublic void delete()
MapContainerdelete in interface MapContainerpublic void setKeyMarshaller(Marshaller keyMarshaller)
MapContainersetKeyMarshaller in interface MapContainerpublic void setValueMarshaller(Marshaller valueMarshaller)
MapContainersetValueMarshaller in interface MapContainerpublic int size()
size in interface java.util.Mapsize in interface MapContainersize in class BaseContainerImplpublic boolean isEmpty()
isEmpty in interface java.util.MapisEmpty in interface MapContainerpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.MapcontainsKey in interface MapContainerpublic java.lang.Object get(java.lang.Object key)
MapContainerget in interface java.util.Mapget in interface MapContainerpublic StoreEntry getEntry(java.lang.Object key)
getEntry in interface MapContainerkey - public boolean containsValue(java.lang.Object o)
containsValue in interface java.util.MapcontainsValue in interface MapContainerpublic void putAll(java.util.Map t)
MapContainerputAll in interface java.util.MapputAll in interface MapContainerpublic java.util.Set keySet()
keySet in interface java.util.MapkeySet in interface MapContainerpublic java.util.Collection values()
values in interface java.util.Mapvalues in interface MapContainerpublic java.util.Set entrySet()
entrySet in interface java.util.MapentrySet in interface MapContainerpublic java.lang.Object put(java.lang.Object key, java.lang.Object value)
MapContainerput in interface java.util.Mapput in interface MapContainerpublic java.lang.Object remove(java.lang.Object key)
MapContainerremove in interface java.util.Mapremove in interface MapContainerpublic boolean removeValue(java.lang.Object o)
protected void remove(IndexItem item)
remove in class BaseContainerImplpublic void clear()
MapContainerclear in interface java.util.Mapclear in interface MapContainerclear in class BaseContainerImplpublic StoreEntry place(java.lang.Object key, java.lang.Object value)
place in interface MapContainerkey - value - public void remove(StoreEntry entry)
remove in interface MapContainerentry - java.io.IOExceptionpublic StoreEntry getFirst()
MapContainergetFirst in interface MapContainerpublic StoreEntry getLast()
MapContainergetLast in interface MapContainerpublic StoreEntry getNext(StoreEntry entry)
MapContainergetNext in interface MapContainerpublic StoreEntry getPrevious(StoreEntry entry)
MapContainergetPrevious in interface MapContainerpublic StoreEntry refresh(StoreEntry entry)
MapContainerrefresh in interface MapContainerentry - old entrypublic java.lang.Object getValue(StoreEntry item)
getValue in interface MapContainergetValue in class BaseContainerImplitem - public java.lang.Object getKey(StoreEntry item)
getKey in interface MapContaineritem - protected IndexLinkedList getItemList()
public int getIndexBinSize()
getIndexBinSize in interface MapContainerpublic void setIndexBinSize(int indexBinSize)
MapContainersetIndexBinSize in interface MapContainerpublic int getIndexKeySize()
getIndexKeySize in interface MapContainerpublic void setIndexKeySize(int indexKeySize)
MapContainersetIndexKeySize in interface MapContainerpublic int getIndexPageSize()
getIndexPageSize in interface MapContainerpublic void setIndexPageSize(int indexPageSize)
MapContainersetIndexPageSize in interface MapContainerpublic int getIndexLoadFactor()
getIndexLoadFactor in interface MapContainerpublic void setIndexLoadFactor(int loadFactor)
setIndexLoadFactor in interface MapContainerloadFactor - the loadFactor to setpublic IndexMBean getIndexMBean()
getIndexMBean in interface MapContainerpublic int getIndexMaxBinSize()
getIndexMaxBinSize in interface MapContainerpublic void setIndexMaxBinSize(int maxBinSize)
MapContainersetIndexMaxBinSize in interface MapContainerpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005-2012. All Rights Reserved.