Interface Container

  • All Superinterfaces:
    java.util.Map<java.lang.Object,​java.lang.Object>
    All Known Implementing Classes:
    FastIteratingContainer, MapContainer, WeakReferenceContainer

    public interface Container
    extends java.util.Map<java.lang.Object,​java.lang.Object>
    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

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getTimestamp()
      Returns the timestamp of this container.
      java.util.Iterator<java.lang.Object> keyIterator()
      Returns an iterator over the keys contained in this container.
      void updateTimestamp()
      Set the timestamp of this container to System.currentTimeMillis().
      java.util.Iterator<java.lang.Object> valueIterator()
      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 Detail

      • 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

        java.util.Iterator<java.lang.Object> 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

        java.util.Iterator<java.lang.Object> 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.