use of com.ms.silverking.cloud.dht.daemon.storage.protocol.PutOperationContainer in project SilverKing by Morgan-Stanley.
the class ActiveProxyPut method localOp.
protected void localOp(List<? extends DHTKey> _entries, OpCommunicator<MessageGroupKeyEntry, PutResult> comm) {
boolean useUpdate;
PutCommunicator pComm;
pComm = (PutCommunicator) comm;
useUpdate = _entries.size() > 0 && (_entries.get(0) instanceof MessageGroupKeyOrdinalEntry);
if (!useUpdate) {
List<StorageValueAndParameters> values;
long creationTime;
creationTime = SystemTimeUtil.systemTimeSource.absTimeNanos();
values = new ArrayList<>(_entries.size());
for (DHTKey _entry : _entries) {
values.add(new StorageValueAndParameters((MessageGroupPutEntry) _entry, (PutOperationContainer) this, creationTime));
if (debug) {
System.out.printf("localOp: %s\n", _entry);
}
// Log.fine(entry);
}
getStorage().put(getContext(), values, getUserData(), pComm);
if (forwardingMode.forwards()) {
for (DHTKey _entry : _entries) {
storageOperation.localUpdate(_entry, StorageProtocolUtil.initialStorageStateOrdinal, OpResult.SUCCEEDED, pComm);
}
}
} else {
localOp_putupdate(_entries, pComm);
}
}
Aggregations