Interface Container
- All Known Implementing Classes:
FastIteratingContainer
,MapContainer
,WeakReferenceContainer
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.
- Since:
- 1.0
- Version:
- $Revision: 8102 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Gregory Block, Ralf Joachim
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the timestamp of this container.Returns an iterator over the keys contained in this container.void
Set the timestamp of this container to System.currentTimeMillis().Returns an iterator over the values contained in this container.Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
updateTimestamp
void updateTimestamp()Set the timestamp of this container to System.currentTimeMillis(). -
getTimestamp
long getTimestamp()Returns the timestamp of this container.- Returns:
- The timestamp.
-
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.
-
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.
-