|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.kaha.impl.container.BaseContainerImpl
org.apache.activemq.kaha.impl.container.MapContainerImpl
public final class MapContainerImpl
Implementation of a MapContainer
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
protected java.util.Map |
indexMap
|
protected Marshaller |
keyMarshaller
|
protected Marshaller |
valueMarshaller
|
Fields inherited from class org.apache.activemq.kaha.impl.container.BaseContainerImpl |
---|
closed, containerId, dataManager, indexList, indexManager, indexType, initialized, loaded, root |
Constructor Summary | |
---|---|
MapContainerImpl(ContainerId id,
IndexItem root,
IndexManager indexManager,
DataManager dataManager,
java.lang.String indexType)
|
Method Summary | |
---|---|
void |
clear()
empty the container |
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object o)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
Get the value associated with the key |
java.util.Map |
getIndexMap()
|
protected java.util.Set |
getInternalKeySet()
|
protected IndexLinkedList |
getItemList()
|
java.lang.Object |
getKey(StoreEntry item)
Get the Key object from it's location |
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 |
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 |
setIndexMap(java.util.Map map)
Set the internal index map |
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()
|
void |
unload()
unload indexes from the container |
java.util.Collection |
values()
|
protected IndexItem |
write(java.lang.Object key,
java.lang.Object value)
|
Methods inherited from class org.apache.activemq.kaha.impl.container.BaseContainerImpl |
---|
checkClosed, close, delete, doClear, expressDataInterest, getContainerId, getDataManager, getId, getIndexManager, getInternalList, getList, isLoaded, isRoot, setList, storeIndex, updateIndexes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.activemq.kaha.MapContainer |
---|
getId, isLoaded |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
protected java.util.Map indexMap
protected Marshaller keyMarshaller
protected Marshaller valueMarshaller
Constructor Detail |
---|
public MapContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager, DataManager dataManager, java.lang.String indexType)
Method Detail |
---|
public void init()
init
in class BaseContainerImpl
public void load()
MapContainer
load
in interface MapContainer
load
in class BaseContainerImpl
public void unload()
MapContainer
unload
in interface MapContainer
unload
in class BaseContainerImpl
public void setKeyMarshaller(Marshaller keyMarshaller)
MapContainer
setKeyMarshaller
in interface MapContainer
public void setValueMarshaller(Marshaller valueMarshaller)
MapContainer
setValueMarshaller
in interface MapContainer
public int size()
size
in interface java.util.Map
size
in interface MapContainer
size
in class BaseContainerImpl
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in interface MapContainer
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in interface MapContainer
public java.lang.Object get(java.lang.Object key)
MapContainer
get
in interface java.util.Map
get
in interface MapContainer
public boolean containsValue(java.lang.Object o)
containsValue
in interface java.util.Map
containsValue
in interface MapContainer
public void putAll(java.util.Map t)
MapContainer
putAll
in interface java.util.Map
putAll
in interface MapContainer
public java.util.Set keySet()
keySet
in interface java.util.Map
keySet
in interface MapContainer
public java.util.Collection values()
values
in interface java.util.Map
values
in interface MapContainer
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in interface MapContainer
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
MapContainer
put
in interface java.util.Map
put
in interface MapContainer
public java.lang.Object remove(java.lang.Object key)
MapContainer
remove
in interface java.util.Map
remove
in interface MapContainer
public boolean removeValue(java.lang.Object o)
protected void remove(IndexItem item)
remove
in class BaseContainerImpl
public void clear()
MapContainer
clear
in interface java.util.Map
clear
in interface MapContainer
clear
in class BaseContainerImpl
public StoreEntry place(java.lang.Object key, java.lang.Object value)
place
in interface MapContainer
key
- value
-
public void remove(StoreEntry entry)
remove
in interface MapContainer
entry
- public java.lang.Object getValue(StoreEntry item)
getValue
in interface MapContainer
getValue
in class BaseContainerImpl
item
-
public java.lang.Object getKey(StoreEntry item)
getKey
in interface MapContainer
item
-
protected java.util.Set getInternalKeySet()
protected IndexLinkedList getItemList()
protected IndexItem write(java.lang.Object key, java.lang.Object value)
public java.util.Map getIndexMap()
getIndexMap
in interface MapContainer
MapContainer.getIndexMap()
public void setIndexMap(java.util.Map map)
MapContainer
setIndexMap
in interface MapContainer
map
- MapContainer.setIndexMap(java.util.Map)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |