org.castor.cache.hashbelt.container

Class MapContainer

Implemented Interfaces:
Cloneable, Container, Map, Serializable

public final class MapContainer
extends ConcurrentHashMap
implements Container

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.
Version:
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Authors:
Gregory Block
Ralf Joachim
Since:
1.0

Nested Class Summary

Nested classes/interfaces inherited from class org.castor.util.concurrent.ConcurrentHashMap

ConcurrentHashMap.Entry, ConcurrentHashMap.HashIterator, ConcurrentHashMap.KeyIterator, ConcurrentHashMap.Segment, ConcurrentHashMap.ValueIterator

Field Summary

Fields inherited from class org.castor.util.concurrent.ConcurrentHashMap

CONCURRENCY_LEVEL, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, SEGMENT_MASK, entrySet, keySet, loadFactor, segments, table, threshold, values, votesForResize

Method Summary

long
getTimestamp()
Iterator
keyIterator()
void
updateTimestamp()
Iterator
valueIterator()

Methods inherited from class org.castor.util.concurrent.ConcurrentHashMap

bitcount, clear, clone, contains, containsKey, containsValue, elements, entrySet, eq, get, hash, isEmpty, keySet, keys, newTable, put, putAll, rehash, remove, remove, resize, size, values

Method Details

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface Container

keyIterator

public Iterator keyIterator()
Specified by:
keyIterator in interface Container

updateTimestamp

public void updateTimestamp()
Specified by:
updateTimestamp in interface Container

valueIterator

public Iterator valueIterator()
Specified by:
valueIterator in interface Container

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com