use of com.hazelcast.concurrent.countdownlatch.CountDownLatchContainer in project hazelcast by hazelcast.
the class BackupAwareCountDownLatchOperation method getBackupOperation.
@Override
public Operation getBackupOperation() {
CountDownLatchService service = getService();
CountDownLatchContainer latchContainer = service.getCountDownLatchContainer(name);
int count = latchContainer != null ? latchContainer.getCount() : 0;
return new CountDownLatchBackupOperation(name, count);
}
use of com.hazelcast.concurrent.countdownlatch.CountDownLatchContainer in project hazelcast by hazelcast.
the class CountDownLatchReplicationOperation method readInternal.
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
super.readInternal(in);
int len = in.readInt();
if (len > 0) {
data = new ArrayList<CountDownLatchContainer>();
for (int i = 0; i < len; i++) {
CountDownLatchContainer latchContainer = new CountDownLatchContainer();
latchContainer.readData(in);
data.add(latchContainer);
}
}
}
use of com.hazelcast.concurrent.countdownlatch.CountDownLatchContainer in project hazelcast by hazelcast.
the class CountDownLatchReplicationOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
super.writeInternal(out);
int len = data != null ? data.size() : 0;
out.writeInt(len);
if (len > 0) {
for (CountDownLatchContainer latchContainer : data) {
latchContainer.writeData(out);
}
}
}
Aggregations