Interface ILeaseTimeSet<E>

All Superinterfaces:
Collection<E>, Iterable<E>
All Known Implementing Classes:
LeaseTimeSet, LeaseTimeSet.SynchronizedLeaseTimeCollection, PassiveLeaseTimeSet

public interface ILeaseTimeSet<E> extends Collection<E>
Special methods for a lease time collection.
  • Method Details

    • add

      boolean add(E e, long leasetime)
      Add a new entry.
      Parameters:
      e - The entry.
      leasetime - The leasetime.
      Returns:
      True, if new entry.
    • update

      boolean update(E e)
      Add a new entry or update an existing entry.
      Parameters:
      entry - The entry.
      Returns:
      True, if new entry.
    • update

      boolean update(E e, long leasetime)
      Add a new entry or update an existing entry.
      Parameters:
      entry - The entry.
      Returns:
      True, if new entry.
    • touch

      void touch(E e)
      Update the timestamp of e.
      Parameters:
      entry - The entry.
    • touch

      void touch(E e, long leasetime)
      Update the timestamp of e.
      Parameters:
      entry - The entry.
    • setRemoveCommand

      void setRemoveCommand(Consumer<jadex.common.Tuple2<E,Long>> cmd)
      Set the remove cmd.