|
||||||||||
| 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 BaseContainerImplpublic void load()
MapContainer
load in interface MapContainerload in class BaseContainerImplpublic void unload()
MapContainer
unload in interface MapContainerunload in class BaseContainerImplpublic void setKeyMarshaller(Marshaller keyMarshaller)
MapContainer
setKeyMarshaller in interface MapContainerpublic void setValueMarshaller(Marshaller valueMarshaller)
MapContainer
setValueMarshaller 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)
MapContainer
get in interface java.util.Mapget in interface MapContainerpublic boolean containsValue(java.lang.Object o)
containsValue in interface java.util.MapcontainsValue in interface MapContainerpublic void putAll(java.util.Map t)
MapContainer
putAll 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 MapContainer
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
MapContainer
put in interface java.util.Mapput in interface MapContainerpublic java.lang.Object remove(java.lang.Object key)
MapContainer
remove 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()
MapContainer
clear in interface java.util.Mapclear in interface MapContainerclear in class BaseContainerImpl
public StoreEntry place(java.lang.Object key,
java.lang.Object value)
place in interface MapContainerkey - value -
public void remove(StoreEntry entry)
remove in interface MapContainerentry - public 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 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 MapContainerMapContainer.getIndexMap()public void setIndexMap(java.util.Map map)
MapContainer
setIndexMap in interface MapContainermap - MapContainer.setIndexMap(java.util.Map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||