Search in sources :

Example 1 with MessageGroupKeyEntry

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

the class MessageModule method handlePutUpdate.

/**
 * Process a put update.
 * @param message
 * @param connection
 */
private void handlePutUpdate(MessageGroup message, MessageGroupConnectionProxy connection) {
    List<PutResult> results;
    long version;
    byte storageState;
    version = ProtoPutUpdateMessageGroup.getPutVersion(message);
    storageState = ProtoPutUpdateMessageGroup.getStorageState(message);
    if (debug) {
        System.out.println("handlePutUpdate storageState: " + storageState);
    }
    results = new ArrayList<>();
    for (MessageGroupKeyEntry entry : message.getKeyIterator()) {
        OpResult opResult;
        opResult = storage.putUpdate(message.getContext(), entry, version, storageState);
        results.add(new PutResult(entry, opResult));
    }
    sendPutResults(message, version, connection, results, storageState, message.getDeadlineRelativeMillis());
}
Also used : MessageGroupKeyEntry(com.ms.silverking.cloud.dht.net.MessageGroupKeyEntry) OpResult(com.ms.silverking.cloud.dht.common.OpResult) PutResult(com.ms.silverking.cloud.dht.net.PutResult)

Aggregations

OpResult (com.ms.silverking.cloud.dht.common.OpResult)1 MessageGroupKeyEntry (com.ms.silverking.cloud.dht.net.MessageGroupKeyEntry)1 PutResult (com.ms.silverking.cloud.dht.net.PutResult)1