Class OortList<E>

    • Constructor Detail

    • Method Detail

      • removeElementListeners

        public void removeElementListeners()
      • contains

        public boolean contains​(E element)
        Returns whether the given element is present in the local entity list of this node. Differently from isPresent(Object), only the local entity list is scanned.
        Parameters:
        element - the element to test for presence
        Returns:
        true if the element is contained in the local entity list, false otherwise
      • isPresent

        public boolean isPresent​(E element)
        Returns whether the given element is present in one of the entity lists of all nodes. Differently from contains(Object) entity lists of all nodes are scanned.
        Parameters:
        element - the element to test for presence
        Returns:
        true if the element is contained in one of the entity lists of all nodes, false otherwise
      • addAndShare

        @Deprecated
        public boolean addAndShare​(E... elements)
        Deprecated.

        Blocking version of addAndShare(Result, Object[]), but deprecated.

        This method will be removed in a future release.

        Parameters:
        elements - the elements to add
        Returns:
        whether at least one of the elements was added to the local entity list
      • addAndShare

        public void addAndShare​(OortObject.Result<java.lang.Boolean> callback,
                                E... elements)

        Adds the given elements to the local entity list, and then broadcasts the addition to all nodes in the cluster.

        Calling this method triggers notifications OortList.ElementListeners, both on this node and on remote nodes.

        The element is guaranteed to be added not when this method returns, but when the OortObject.Result parameter is notified.

        Parameters:
        callback - the callback invoked with whether at least one of the elements was added to the local entity list or null if there is no interest in knowing whether elements were added
        elements - the elements to add
      • removeAndShare

        @Deprecated
        public boolean removeAndShare​(E... elements)
        Deprecated.

        Blocking version of removeAndShare(Result, Object[]), but deprecated.

        This method will be removed in a future release.

        Parameters:
        elements - the elements to remove
        Returns:
        whether at least one of the elements was removed from the local entity list
      • removeAndShare

        public void removeAndShare​(OortObject.Result<java.lang.Boolean> callback,
                                   E... elements)

        Removes the given elements to the local entity list, and then broadcasts the removal to all nodes in the cluster.

        Calling this method triggers notifications OortList.ElementListeners, both on this node and on remote nodes.

        The element is guaranteed to be removed not when this method returns, but when the OortObject.Result parameter is notified.

        Parameters:
        callback - the callback invoked with whether at least one of the elements was removed to the local entity list or null if there is no interest in knowing whether elements were removed
        elements - the elements to remove
      • isItemUpdate

        protected boolean isItemUpdate​(java.util.Map<java.lang.String,java.lang.Object> data)
        Specified by:
        isItemUpdate in class OortContainer<java.util.List<E>>
      • onItem

        protected void onItem​(OortObject.Info<java.util.List<E>> info,
                              java.util.Map<java.lang.String,java.lang.Object> data)
        Specified by:
        onItem in class OortContainer<java.util.List<E>>