org.apache.activemq.kaha.impl.index
Class RangeLimitedMap

java.lang.Object
  extended by org.apache.activemq.kaha.impl.index.RangeLimitedMap
All Implemented Interfaces:
Map

public class RangeLimitedMap
extends Object
implements Map

A Map of keys and IndexItems - which is limited in size

Version:
$Revision: 1.2 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
RangeLimitedMap(IndexLinkedList indexList, DataManager keyDataManager, Marshaller keyMarshaller)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 Object get(Object key)
           
protected  IndexLinkedList getIndexList()
           
protected  Object getKey(IndexItem item)
           
 int getMaxRange()
           
protected  IndexItem getNextEntry(IndexItem item)
           
 boolean isEmpty()
           
 Set keySet()
           
protected  int pageIntoMap(IndexItem start)
          fill the internalMap
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
 void setMaxRange(int maxRange)
           
 int size()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

RangeLimitedMap

public RangeLimitedMap(IndexLinkedList indexList,
                       DataManager keyDataManager,
                       Marshaller keyMarshaller)
Parameters:
indexList -
keyDataManager -
keyMarshaller -
Method Detail

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map
Parameters:
key -
Returns:
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map
Parameters:
value -
Returns:
See Also:
Map.containsValue(java.lang.Object)

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Returns:
See Also:
Map.entrySet()

get

public Object get(Object key)
Specified by:
get in interface Map
Parameters:
key -
Returns:
the value associated with the key
See Also:
Map.get(java.lang.Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Returns:
See Also:
Map.isEmpty()

keySet

public Set keySet()
Specified by:
keySet in interface Map
Returns:
See Also:
Map.keySet()

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map
Parameters:
key -
value -
Returns:
See Also:
Map.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map
Parameters:
t -
See Also:
Map.putAll(java.util.Map)

remove

public Object remove(Object key)
Specified by:
remove in interface Map
Parameters:
key -
Returns:
See Also:
Map.remove(java.lang.Object)

size

public int size()
Specified by:
size in interface Map
Returns:
See Also:
Map.size()

values

public Collection values()
Specified by:
values in interface Map
Returns:
See Also:
Map.values()

getMaxRange

public int getMaxRange()
Returns:
the maxRange

setMaxRange

public void setMaxRange(int maxRange)
Parameters:
maxRange - the maxRange to set

pageIntoMap

protected int pageIntoMap(IndexItem start)
fill the internalMap

Parameters:
start -
numberOfItems -
Returns:
the actual number of items paged into the internalMap

clear

public void clear()
Specified by:
clear in interface Map
See Also:
Map.clear()

getIndexList

protected IndexLinkedList getIndexList()
Returns:
the indexList

getKey

protected Object getKey(IndexItem item)

getNextEntry

protected IndexItem getNextEntry(IndexItem item)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.