Search in sources :

Example 1 with ProtoChecksumTreeRequestMessageGroup

use of com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup in project SilverKing by Morgan-Stanley.

the class ActiveRegionSync method sendChecksumTreeRequest.

// //////////////////////////////////////////////////////////////////
private void sendChecksumTreeRequest(ChecksumTreeRequest ctr) {
    MessageGroup mg;
    mg = new ProtoChecksumTreeRequestMessageGroup(uuid, namespace, ctr.getTargetCP(), ctr.getCurCP(), mgBase.getMyID(), ctr.getRegion(), false).toMessageGroup();
    if (verbose || debug) {
        Log.warningAsyncf("%x requestChecksumTree: %s\t%s\t%s\t%s", namespace, ctr.getReplica(), ctr.getRegion(), ctr.getTargetCP(), ctr.getCurCP());
    }
    mgBase.send(mg, ctr.getReplica());
    ctr.setSent();
}
Also used : ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup) MessageGroup(com.ms.silverking.cloud.dht.net.MessageGroup) ProtoRetrievalMessageGroup(com.ms.silverking.cloud.dht.net.ProtoRetrievalMessageGroup) ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup)

Example 2 with ProtoChecksumTreeRequestMessageGroup

use of com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup in project SilverKing by Morgan-Stanley.

the class SyncController method sendReplicaSyncRequest.

private void sendReplicaSyncRequest(ReplicaSyncRequest r) {
    MessageGroup mg;
    ensureFrozen();
    mg = new ProtoChecksumTreeRequestMessageGroup(r.getUUID(), r.getNS(), targetCP, curCP, mgBase.getMyID(), r.getRegion(), r.getOldOwner(), true).toMessageGroup();
    if (verbose || debug) {
        Log.warningAsyncf("%x requestChecksumTree: %s", r.getNS(), r);
    }
    if (!hasErrors) {
        mgBase.send(mg, r.getNewOwner());
        r.setSendTime(absMillisTimeSource.absTimeMillis());
    }
}
Also used : ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup) MessageGroup(com.ms.silverking.cloud.dht.net.MessageGroup) ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup)

Example 3 with ProtoChecksumTreeRequestMessageGroup

use of com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup in project SilverKing by Morgan-Stanley.

the class DHTRingMaster method requestChecksumTree.

public void requestChecksumTree(Triple<Long, Long, Long> nsAndRegion, ConvergencePoint curCP, ConvergencePoint targetCP, IPAndPort owner) {
    MessageGroup mg;
    UUIDBase uuid;
    uuid = UUIDBase.random();
    mg = new ProtoChecksumTreeRequestMessageGroup(uuid, nsAndRegion.getV1(), targetCP, curCP, mgBase.getMyID(), new RingRegion(nsAndRegion.getV2(), nsAndRegion.getV3()), mgBase._getIPAndPort(), false).toMessageGroup();
    mgBase.send(mg, owner);
}
Also used : RingRegion(com.ms.silverking.cloud.ring.RingRegion) ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup) MessageGroup(com.ms.silverking.cloud.dht.net.MessageGroup) ProtoChecksumTreeMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeMessageGroup) UUIDBase(com.ms.silverking.id.UUIDBase) ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup)

Example 4 with ProtoChecksumTreeRequestMessageGroup

use of com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup in project SilverKing by Morgan-Stanley.

the class ConvergenceController2 method sendChecksumTreeRequest.

private void sendChecksumTreeRequest(ChecksumTreeRequest ctr) {
    MessageGroup mg;
    UUIDBase uuid;
    uuid = UUIDBase.random();
    outstandingChecksumTreeRequests.put(uuid, ctr);
    convergenceControllers.put(uuid, this);
    mg = new ProtoChecksumTreeRequestMessageGroup(uuid, ns, ctr.getTargetCP(), ctr.getCurCP(), mgBase.getMyID(), ctr.getRegion(), false).toMessageGroup();
    if (verbose || debug) {
        Log.warningAsyncf("%x requestChecksumTree: %s\t%s\t%s\t%s", ns, ctr.getReplica(), ctr.getRegion(), ctr.getTargetCP(), ctr.getCurCP());
    }
    mgBase.send(mg, ctr.getReplica());
    ctr.setSent();
}
Also used : ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup) MessageGroup(com.ms.silverking.cloud.dht.net.MessageGroup) ProtoRetrievalMessageGroup(com.ms.silverking.cloud.dht.net.ProtoRetrievalMessageGroup) UUIDBase(com.ms.silverking.id.UUIDBase) ProtoChecksumTreeRequestMessageGroup(com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup)

Aggregations

MessageGroup (com.ms.silverking.cloud.dht.net.MessageGroup)4 ProtoChecksumTreeRequestMessageGroup (com.ms.silverking.cloud.dht.net.ProtoChecksumTreeRequestMessageGroup)4 ProtoRetrievalMessageGroup (com.ms.silverking.cloud.dht.net.ProtoRetrievalMessageGroup)2 UUIDBase (com.ms.silverking.id.UUIDBase)2 ProtoChecksumTreeMessageGroup (com.ms.silverking.cloud.dht.net.ProtoChecksumTreeMessageGroup)1 RingRegion (com.ms.silverking.cloud.ring.RingRegion)1