org.castor.cache.hashbelt.container

Interface Container

All Superinterfaces:
Map
Known Implementing Classes:
FastIteratingContainer, MapContainer, WeakReferenceContainer

public interface Container
extends Map

An interface describing implementation strategies for containers on the hashbelt; containers hold objects that are in the hashbelt, and provide the time-based grouping that allows the container to be efficiently dealt with as a group of objects to be expired.

Implementations of this interface need to be appropriately synchronized -- the implementations of the hashbelt rely on this object to be threadsafe.

Version:
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Authors:
Gregory Block
Ralf Joachim
Since:
1.0

Method Summary

long
getTimestamp()
Returns the timestamp of this container.
Iterator
keyIterator()
Returns an iterator over the keys contained in this container.
void
updateTimestamp()
Set the timestamp of this container to System.currentTimeMillis().
Iterator
valueIterator()
Returns an iterator over the values contained in this container.

Method Details

getTimestamp

public long getTimestamp()
Returns the timestamp of this container.
Returns:
The timestamp.

keyIterator

public 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.
Returns:
An iterator over the keys currently contained in the container.

updateTimestamp

public void updateTimestamp()
Set the timestamp of this container to System.currentTimeMillis().

valueIterator

public 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.
Returns:
An iterator over the values currently contained in the container.

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