use of com.ms.silverking.cloud.dht.common.DHTKey in project SilverKing by Morgan-Stanley.
the class StringSHA1KeyCreator method main.
public static void main(String[] args) {
StringSHA1KeyCreator stringSHA1KeyCreator;
DHTKey key;
DHTKey[] subKeys;
int numSubKeys;
stringSHA1KeyCreator = new StringSHA1KeyCreator();
key = stringSHA1KeyCreator.createKey("GeorgeWashington");
numSubKeys = 5;
subKeys = stringSHA1KeyCreator.createSubKeys(key, numSubKeys);
System.out.println(key);
for (int i = 0; i < subKeys.length; i++) {
System.out.printf("%d\t%s\n", i, subKeys[i]);
}
}
use of com.ms.silverking.cloud.dht.common.DHTKey in project SilverKing by Morgan-Stanley.
the class ProtoChecksumTreeMessageGroup method deserializeKeyAndVersionChecksum.
private static KeyAndVersionChecksum deserializeKeyAndVersionChecksum(ByteBuffer buffer) {
DHTKey key;
long versionChecksum;
key = deserializeKey(buffer);
versionChecksum = buffer.getLong();
return new KeyAndVersionChecksum(key, versionChecksum);
}
Aggregations