Search in sources :

Example 1 with SimpleValueCreator

use of com.ms.silverking.cloud.dht.common.SimpleValueCreator in project SilverKing by Morgan-Stanley.

the class ActiveProxyOperation method forwardGroup.

/**
 * Forward to a single replica
 * @param replica
 * @param destEntries
 * @param optionsByteBuffer
 */
private <L extends DHTKey> void forwardGroup(IPAndPort replica, List<L> destEntries, ByteBuffer optionsByteBuffer, ForwardCreator<L> forwardCreator, OpCommunicator<K, R> comm) {
    if (forwardingMode.forwards()) {
        MessageGroup mg;
        assert replica != null;
        mg = forwardCreator.createForward(destEntries, optionsByteBuffer);
        if (debug) {
            System.out.println("Forwarding: " + new SimpleValueCreator(originator) + ":" + replica + " : " + mg + ":" + mg.getForwardingMode());
            mg.displayForDebug();
        }
        messageModule.getMessageGroupBase().send(mg, replica);
    } else {
        localOp(destEntries, comm);
    }
}
Also used : SimpleValueCreator(com.ms.silverking.cloud.dht.common.SimpleValueCreator) MessageGroup(com.ms.silverking.cloud.dht.net.MessageGroup) ProtoPutMessageGroup(com.ms.silverking.cloud.dht.net.ProtoPutMessageGroup)

Aggregations

SimpleValueCreator (com.ms.silverking.cloud.dht.common.SimpleValueCreator)1 MessageGroup (com.ms.silverking.cloud.dht.net.MessageGroup)1 ProtoPutMessageGroup (com.ms.silverking.cloud.dht.net.ProtoPutMessageGroup)1