|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractMap
org.castor.util.concurrent.ConcurrentHashMap
org.castor.cache.hashbelt.container.MapContainer
A very basic, HashMap-based implementation of the hashmap container strategy, using nothing more than a basic hashmap to store key/value pairs. This works well for lots of gets and a reasonably high volume of removes; if few removes are required, and iterators are important to your particluar use-case of the cache, it's better to use the FastIteratingContainer, which can handle iterating at a higher speed, still has a map for accessing hash values, but has a higher removal cost.
| Nested Class Summary |
| Nested classes inherited from class org.castor.util.concurrent.ConcurrentHashMap |
org.castor.util.concurrent.ConcurrentHashMap.Entry, org.castor.util.concurrent.ConcurrentHashMap.HashIterator, org.castor.util.concurrent.ConcurrentHashMap.KeyIterator, org.castor.util.concurrent.ConcurrentHashMap.Segment, org.castor.util.concurrent.ConcurrentHashMap.ValueIterator |
| Nested classes inherited from class java.util.AbstractMap |
|
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Field Summary |
| Fields inherited from class org.castor.util.concurrent.ConcurrentHashMap |
CONCURRENCY_LEVEL, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, entrySet, keySet, loadFactor, SEGMENT_MASK, segments, table, threshold, values, votesForResize |
| Constructor Summary | |
MapContainer()
|
|
| Method Summary | |
long |
getTimestamp()
Returns the timestamp of this container. |
java.util.Iterator |
keyIterator()
Returns an iterator over the keys contained in this container. If the container is modified while an iteration is in progress, the results of the iteration is not affected and vice-versa. |
void |
updateTimestamp()
Set the timestamp of this container to System.currentTimeMillis(). |
java.util.Iterator |
valueIterator()
Returns an iterator over the values contained in this container. If the container is modified while an iteration is in progress, the results of the iteration is not affected and vice-versa. |
| Methods inherited from class org.castor.util.concurrent.ConcurrentHashMap |
bitcount, clear, clone, contains, containsKey, containsValue, elements, entrySet, eq, get, hash, isEmpty, keys, keySet, newTable, put, putAll, rehash, remove, remove, resize, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Constructor Detail |
public MapContainer()
| Method Detail |
public void updateTimestamp()
updateTimestamp in interface ContainerContainer.updateTimestamp()public long getTimestamp()
getTimestamp in interface ContainerContainer.getTimestamp()public java.util.Iterator keyIterator()
keyIterator in interface ContainerContainer.keyIterator()public java.util.Iterator valueIterator()
valueIterator in interface ContainerContainer.valueIterator()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||