cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/OortList.java
/**
     * <p>Removes the given {@code elements} to the local entity list,
     * and then broadcasts the removal to all nodes in the cluster.</p>
     * <p>Calling this method triggers notifications {@link ElementListener}s,
     * both on this node and on remote nodes.</p>
     * <p>The element is guaranteed to be removed not when this method returns,
     * but when the {@link Result} parameter is notified.</p>
     *
     * @param callback the callback invoked with whether at least one of the elements was removed to the local entity list
     *                 or {@code null} if there is no interest in knowing whether elements were removed
     * @param elements the elements to remove
     */
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  ElementListeners,
both on this node and on remote nodes.
The element is guaranteed to be removed not when this method returns,
but when the  Result parameter is notified.

@param 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
@param elements the elements to remove
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 ElementListeners both on this node and on remote nodes . The element is guaranteed to be removed not when this method returns but when the Result parameter is notified . @param 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 @param elements the elements to remove
public void removeAndShare(Result<Boolean> callback, E... elements) {
        Data<Boolean> data = new Data<>(6, callback);
        data.put(Info.OORT_URL_FIELD, getOort().getURL());
        data.put(Info.NAME_FIELD, getName());
        data.put(Info.OBJECT_FIELD, elements);
        data.put(Info.TYPE_FIELD, TYPE_FIELD_ELEMENT_VALUE);
        data.put(Info.ACTION_FIELD, ACTION_FIELD_REMOVE_VALUE);
        if (logger.isDebugEnabled()) {
            logger.debug("Sharing list remove {}", data);
        }
        BayeuxServer bayeuxServer = getOort().getBayeuxServer();
        bayeuxServer.getChannel(getChannelName()).publish(getLocalSession(), data, Promise.noop());
    }
public void removeAndShare ( Result < Boolean > callback , E ... elements ) { Data < Boolean > data = new Data < > ( 6 , callback ) ; data . put ( Info . OORT_URL_FIELD , getOort ( ) . getURL ( ) ) ; data . put ( Info . NAME_FIELD , getName ( ) ) ; data . put ( Info . OBJECT_FIELD , elements ) ; data . put ( Info . TYPE_FIELD , TYPE_FIELD_ELEMENT_VALUE ) ; data . put ( Info . ACTION_FIELD , ACTION_FIELD_REMOVE_VALUE ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Sharing list remove {}" , data ) ; } BayeuxServer bayeuxServer = getOort ( ) . getBayeuxServer ( ) ; bayeuxServer . getChannel ( getChannelName ( ) ) . publish ( getLocalSession ( ) , data , Promise . noop ( ) ) ; }
<p>Removes the given {@code elements} to the local entity list,
 and then broadcasts the removal to all nodes in the cluster.</p>
 <p>Calling this method triggers notifications {@link ElementListener}s,
 both on this node and on remote nodes.</p>
 <p>The element is guaranteed to be removed not when this method returns,
 but when the {@link Result} parameter is notified.</p>
<p > Removes the given { @code elements } to the local entity list and then broadcasts the removal to all nodes in the cluster . < / p > <p > Calling this method triggers notifications { @link ElementListener } s both on this node and on remote nodes . < / p > <p > The element is guaranteed to be removed not when this method returns but when the { @link Result } parameter is notified . < / p >