Class SynchAdder<E>

java.lang.Object
one.microstream.collections.SynchAdder<E>
All Implemented Interfaces:
Consumer<E>, CapacityCarrying, CapacityExtendable, ExtendedCollection<E>, OptimizableCollection, Sized, XAddingCollection<E>, Synchronized, ThreadSafe

public final class SynchAdder<E>
extends Object
implements XAddingCollection<E>, Synchronized
  • Nested Class Summary

    Nested classes/interfaces inherited from interface one.microstream.collections.types.XAddingCollection

    XAddingCollection.Creator<E>
  • Constructor Summary

    Constructors 
    Constructor Description
    SynchAdder​(XAddingCollection<E> collection)  
  • Method Summary

    Modifier and Type Method Description
    void accept​(E e)  
    boolean add​(E e)
    Adds the passed element.
    SynchAdder<E> addAll​(E... elements)  
    SynchAdder<E> addAll​(E[] elements, int offset, int length)  
    SynchAdder<E> addAll​(XGettingCollection<? extends E> elements)  
    long currentCapacity()
    Returns the current amount of elements this instance can hold before a storage rebuild becomes necessary.
    SynchAdder<E> ensureCapacity​(long minimalCapacity)  
    SynchAdder<E> ensureFreeCapacity​(long minimalFreeCapacity)
    Ensures that the next minimalFreeCapacity elements can be actually added in a fast way, meaning for example no internal storage rebuild will be necessary.
    boolean hasVolatileElements()
    Tells if this collection contains volatile elements.
    An element is volatile, if it can become no longer reachable by the collection without being removed from the collection.
    boolean isEmpty()  
    boolean isFull()
    Returns true if the current capacity cannot be increased any more.
    long maximumCapacity()
    Returns the maximum amount of elements this carrier instance can contain.
    The actual value may be depend on the configuration of the concrete instance or may depend only on the implementation of the carrier (meaning it is constant for all instances of the implementation, e.g.
    boolean nullAdd()  
    boolean nullAllowed()
    Defines if null-elements are allowed inside the collection or not.
    long optimize()
    Optimizes the internal storage of this collection and returns the storage size of the collection after the process is complete.
    long remainingCapacity()
    Returns the amount of elements this carrier instance can collect before reaching its maximimum capacity.
    long size()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface one.microstream.collections.interfaces.CapacityExtendable

    currentFreeCapacity

    Methods inherited from interface java.util.function.Consumer

    andThen

    Methods inherited from interface one.microstream.collections.types.XAddingCollection

    collector