Class AbstractTxnCollection<E>

    • Field Detail

      • stm

        protected final Stm stm
      • defaultRefFactory

        protected final TxnRefFactory defaultRefFactory
    • Constructor Detail

      • AbstractTxnCollection

        protected AbstractTxnCollection​(Stm stm)
    • Method Detail

      • getStm

        public Stm getStm()
        Description copied from interface: TxnCollection
        Returns the STM that manages this TxnCollection. Returned value will never be null.
        Specified by:
        getStm in interface TxnCollection<E>
        Returns:
        the STM that manages this TxnCollection.
      • isEmpty

        public boolean isEmpty​(Txn tx)
        Description copied from interface: TxnCollection
        Returns true if this collection contains no elements.
        Specified by:
        isEmpty in interface TxnCollection<E>
        Parameters:
        tx - the transaction used for this operation.
        Returns:
        true if this collection contains no elements
      • containsAll

        public boolean containsAll​(Txn tx,
                                   Collection<?> c)
        Description copied from interface: TxnCollection
        Returns true if this collection contains all of the elements in the specified collection.
        Specified by:
        containsAll in interface TxnCollection<E>
        Parameters:
        tx - the transaction used for this operation.
        c - collection to be checked for containment in this collection
        Returns:
        true if this collection contains all of the elements in the specified collection
        See Also:
        Collection.contains(Object)
      • add

        public boolean add​(E item)
        Specified by:
        add in interface Collection<E>
      • addAll

        public boolean addAll​(Txn tx,
                              Collection<? extends E> c)
        Description copied from interface: TxnCollection
        Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)
        Specified by:
        addAll in interface TxnCollection<E>
        Parameters:
        tx - the transaction used for this operation.
        c - collection containing elements to be added to this collection
        Returns:
        true if this collection changed as a result of the call
        See Also:
        Collection.add(Object)
      • addAll

        public boolean addAll​(TxnCollection<? extends E> c)
        Description copied from interface: TxnCollection
        Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)
        Specified by:
        addAll in interface TxnCollection<E>
        Parameters:
        c - collection containing elements to be added to this collection
        Returns:
        true if this collection changed as a result of the call
        See Also:
        Collection.add(Object)
      • addAll

        public boolean addAll​(Txn tx,
                              TxnCollection<? extends E> c)
        Description copied from interface: TxnCollection
        Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)
        Specified by:
        addAll in interface TxnCollection<E>
        c - collection containing elements to be added to this collection
        Returns:
        true if this collection changed as a result of the call
        See Also:
        Collection.add(Object)
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface Collection<E>