cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/OortMap.java
/**
     * <p>Removes the given {@code key} from the local entity map,
     * and broadcasts the operation to all nodes in the cluster.</p>
     * <p>Calling this method triggers notifications {@link EntryListener}s, both on this node and on remote nodes.</p>
     * <p>The entry is guaranteed to be removed not when this method returns,
     * but when the {@link Result} parameter is notified.</p>
     *
     * @param key      the key to remove
     * @param callback the callback invoked with the value,
     *                 or {@code null} if there is no interest in the value
     * @see #putAndShare(Object, Object, Result)
     */
Removes the given  key from the local entity map,
and broadcasts the operation to all nodes in the cluster.
Calling this method triggers notifications  EntryListeners, both on this node and on remote nodes.
The entry is guaranteed to be removed not when this method returns,
but when the  Result parameter is notified.

@param key      the key to remove
@param callback the callback invoked with the value,
or  null if there is no interest in the value
@see #putAndShare(Object, Object, Result)
Removes the given key from the local entity map and broadcasts the operation to all nodes in the cluster . Calling this method triggers notifications EntryListeners both on this node and on remote nodes . The entry is guaranteed to be removed not when this method returns but when the Result parameter is notified . @param key the key to remove @param callback the callback invoked with the value or null if there is no interest in the value @see #putAndShare ( Object Object Result )
public void removeAndShare(K key, Result<V> callback) {
        Map<String, Object> entry = new HashMap<>(1);
        entry.put(KEY_FIELD, key);
        Data<V> data = new Data<>(6, callback);
        data.put(Info.OORT_URL_FIELD, getOort().getURL());
        data.put(Info.NAME_FIELD, getName());
        data.put(Info.OBJECT_FIELD, entry);
        data.put(Info.TYPE_FIELD, TYPE_FIELD_ENTRY_VALUE);
        data.put(Info.ACTION_FIELD, ACTION_FIELD_REMOVE_VALUE);
        if (logger.isDebugEnabled()) {
            logger.debug("Sharing map remove {}", data);
        }
        BayeuxServer bayeuxServer = getOort().getBayeuxServer();
        bayeuxServer.getChannel(getChannelName()).publish(getLocalSession(), data, Promise.noop());
    }
public void removeAndShare ( K key , Result < V > callback ) { Map < String , Object > entry = new HashMap < > ( 1 ) ; entry . put ( KEY_FIELD , key ) ; Data < V > data = new Data < > ( 6 , callback ) ; data . put ( Info . OORT_URL_FIELD , getOort ( ) . getURL ( ) ) ; data . put ( Info . NAME_FIELD , getName ( ) ) ; data . put ( Info . OBJECT_FIELD , entry ) ; data . put ( Info . TYPE_FIELD , TYPE_FIELD_ENTRY_VALUE ) ; data . put ( Info . ACTION_FIELD , ACTION_FIELD_REMOVE_VALUE ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Sharing map remove {}" , data ) ; } BayeuxServer bayeuxServer = getOort ( ) . getBayeuxServer ( ) ; bayeuxServer . getChannel ( getChannelName ( ) ) . publish ( getLocalSession ( ) , data , Promise . noop ( ) ) ; }
<p>Removes the given {@code key} from the local entity map,
 and broadcasts the operation to all nodes in the cluster.</p>
 <p>Calling this method triggers notifications {@link EntryListener}s, both on this node and on remote nodes.</p>
 <p>The entry is guaranteed to be removed not when this method returns,
 but when the {@link Result} parameter is notified.</p>
<p > Removes the given { @code key } from the local entity map and broadcasts the operation to all nodes in the cluster . < / p > <p > Calling this method triggers notifications { @link EntryListener } s both on this node and on remote nodes . < / p > <p > The entry is guaranteed to be removed not when this method returns but when the { @link Result } parameter is notified . < / p >