Interface ICollection<T>

All Known Subinterfaces:
IEntryCacheInfo, IOrderedList<T>, IStoredList<T>
All Known Implementing Classes:
AbstractStoredList, BlobStoreRefEntryCacheInfo, ConcurrentSegmentedStoredList, ConcurrentSegmentedStoredListHashmapEntry, ConcurrentStoredList, EvictableEntryCacheInfo, ExternallyLockedStoredList, HashedSimpleLockIStoredList, MemoryBasedEntryCacheInfo, MVCCEntryCacheInfo, MVCCShellEntryCacheInfo, RwlSegmentedStoredList, SimpleLockStoredList, TemplateCacheInfo

public interface ICollection<T>
Interface for all internal collections.
Since:
6.1
Author:
anna
See Also:
  • Method Details

    • size

      int size()
      Returns the amount of elements in the StoredList.
      Returns:
      size of the StoredList
      See Also:
    • isEmpty

      boolean isEmpty()
      Returns true if this list is empty, i.e. has no elements. [Tail] - [Head]
      Returns:
      true if list is empty; false otherwise.
    • establishListScan

      IStoredListIterator<T> establishListScan(boolean random_scan)
      establish a scan position. if random scan is supported we select a random position; otherwise we return the first resource by scanning from head to tail.
      Parameters:
      random_scan - true enable random scan; false start from head.
      Returns:
      a Holder for this scan. This Resource should be released if scan ended prematurely.
    • establishListScan

      default IStoredListIterator<T> establishListScan(boolean random_scan, boolean alternatingThread)
      establish a scan position. if random scan is supported we select a random position; otherwise we return the first resource by scanning from head to tail.
      Parameters:
      random_scan - true enable random scan; false start from head.
      alternatingThread - true the result iter many be used by a not-same thread
      Returns:
      a Holder for this scan. This Resource should be released if scan ended prematurely.
    • next

      Returns the next element in the scan order. Calling this method until it returns null, will return each element as part of the SLHolders subject.
      Parameters:
      slh - Holder representing a pivot position.
      Returns:
      the next pivot position in this scan; null if reached end of scan.
    • add

      IObjectInfo<T> add(T subject)
      Store an element in the list. New elements are inserted at the tail.
      Parameters:
      subject - element to store.
      Returns:
      an information node representing the inserted element; null if StoredList has been invalidated.
    • removeByObject

      boolean removeByObject(T obj)
      Given an element scan the list, find it and remove it.
      Parameters:
      obj - element to remove
      Returns:
      true if object was removed; false otherwise (if element wasn't found)
    • contains

      boolean contains(T obj)
      Checks whether it contains the specified element.
      Parameters:
      obj - the element to search for
      Returns:
      true if element exists in the StoredList; false otherwise.
    • isMultiObjectCollection

      boolean isMultiObjectCollection()
      is it an actual multi object container.
      Returns:
      true if its an actual list; false otherwise