src/main/java/toy/das/atomicBroadcast/RBrodcastService.java
/**
     * Clearing the buffers from irrelevant messages. This method is called bt <i>gc</i> of ToyServer.
     * @param key The key of the message to be deleted
     */
Clearing the buffers from irrelevant messages. This method is called bt gc of ToyServer.
@param key The key of the message to be deleted
Clearing the buffers from irrelevant messages . This method is called bt gc of ToyServer . @param key The key of the message to be deleted
public void clearBuffers(Types.Meta key) {
        synchronized (recMsg) {
            int channel = key.getChannel();
            int cid = key.getCid();
            if (!recMsg.containsKey(channel)) return;
            recMsg.replace(channel, recMsg
                    .get(key.getChannel())
                    .stream()
                    .filter(m -> m.getM().getChannel() == channel && m.getM().getCid() == cid)
                    .collect(Collectors.toList()));
        }
    }
public void clearBuffers ( Types . Meta key ) { synchronized ( recMsg ) { int channel = key . getChannel ( ) ; int cid = key . getCid ( ) ; if ( ! recMsg . containsKey ( channel ) ) return ; recMsg . replace ( channel , recMsg . get ( key . getChannel ( ) ) . stream ( ) . filter ( m -> m . getM ( ) . getChannel ( ) == channel && m . getM ( ) . getCid ( ) == cid ) . collect ( Collectors . toList ( ) ) ) ; } }
Clearing the buffers from irrelevant messages.
Clearing the buffers from irrelevant messages .