Search in sources :

Example 6 with ChecksumNode

use of com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode in project SilverKing by Morgan-Stanley.

the class ActiveClientOperationTable method receivedChecksumTree.

// FUTURE - for testing, consider removing
public void receivedChecksumTree(MessageGroup message) {
    ChecksumNode checksumNode;
    checksumNode = ProtoChecksumTreeMessageGroup.deserialize(message);
    System.out.println(checksumNode);
    activeVersionedBasicOperations.receivedOpResponse(message);
}
Also used : ChecksumNode(com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode)

Example 7 with ChecksumNode

use of com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode in project SilverKing by Morgan-Stanley.

the class ChecksumTreeDebug method incomingChecksumTree.

private void incomingChecksumTree(MessageGroup message, MessageGroupConnection connection) {
    ChecksumNode remoteTree;
    ConvergencePoint cp;
    cp = ProtoChecksumTreeMessageGroup.getConvergencePoint(message);
    remoteTree = ProtoChecksumTreeMessageGroup.deserialize(message);
    ars.incomingChecksumTree(cp, remoteTree, connection);
}
Also used : ConvergencePoint(com.ms.silverking.cloud.dht.daemon.storage.convergence.ConvergencePoint) ChecksumNode(com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode)

Example 8 with ChecksumNode

use of com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode in project SilverKing by Morgan-Stanley.

the class TreeTest method serializationTest.

private void serializationTest(ChecksumNode checksumNode) {
    ChecksumNode dNode;
    ByteBuffer buffer;
    buffer = ByteBuffer.allocate(1024 * 1024);
    ProtoChecksumTreeMessageGroup.serialize(buffer, checksumNode);
    System.out.println(buffer);
    buffer.flip();
    System.out.println(buffer);
    dNode = ProtoChecksumTreeMessageGroup.deserialize(buffer);
    System.out.println(" *** Pre-serialization ***");
    System.out.println(checksumNode);
    System.out.println(" *** Post-serialization ***");
    System.out.println(dNode);
    System.out.println(" *** Match test ***");
    System.out.println(TreeMatcher.match(dNode, checksumNode));
}
Also used : ChecksumNode(com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ChecksumNode (com.ms.silverking.cloud.dht.daemon.storage.convergence.ChecksumNode)8 ConvergencePoint (com.ms.silverking.cloud.dht.daemon.storage.convergence.ConvergencePoint)4 KeyAndVersionChecksum (com.ms.silverking.cloud.dht.daemon.storage.KeyAndVersionChecksum)2 AbstractChecksumNode (com.ms.silverking.cloud.dht.daemon.storage.convergence.AbstractChecksumNode)2 LeafChecksumNode (com.ms.silverking.cloud.dht.daemon.storage.convergence.LeafChecksumNode)2 NonLeafChecksumNode (com.ms.silverking.cloud.dht.daemon.storage.convergence.NonLeafChecksumNode)2 RingRegion (com.ms.silverking.cloud.ring.RingRegion)1 ByteBuffer (java.nio.ByteBuffer)1