use of com.hazelcast.internal.eviction.ExpiredKey in project hazelcast by hazelcast.
the class CacheExpireBatchBackupOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
super.writeInternal(out);
out.writeInt(expiredKeys.size());
for (ExpiredKey expiredKey : expiredKeys) {
IOUtil.writeData(out, expiredKey.getKey());
out.writeLong(expiredKey.getMetadata());
}
out.writeInt(primaryEntryCount);
}
use of com.hazelcast.internal.eviction.ExpiredKey in project hazelcast by hazelcast.
the class EvictBatchBackupOperation method runInternal.
@Override
protected void runInternal() {
if (recordStore == null) {
return;
}
for (ExpiredKey expiredKey : expiredKeys) {
Data key = expiredKey.getKey();
Record existingRecord = recordStore.getRecord(key);
if (hasSameValueHashCode(existingRecord, expiredKey)) {
recordStore.evict(key, true);
}
}
equalizeEntryCountWithPrimary();
}
use of com.hazelcast.internal.eviction.ExpiredKey in project hazelcast by hazelcast.
the class EvictBatchBackupOperation method readInternal.
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
super.readInternal(in);
name = in.readString();
int size = in.readInt();
expiredKeys = new LinkedList<>();
for (int i = 0; i < size; i++) {
expiredKeys.add(new ExpiredKey(IOUtil.readData(in), in.readLong()));
}
primaryEntryCount = in.readInt();
}
use of com.hazelcast.internal.eviction.ExpiredKey in project hazelcast by hazelcast.
the class CacheExpireBatchBackupOperation method readInternal.
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
super.readInternal(in);
int size = in.readInt();
expiredKeys = new LinkedList<ExpiredKey>();
for (int i = 0; i < size; i++) {
expiredKeys.add(new ExpiredKey(IOUtil.readData(in), in.readLong()));
}
primaryEntryCount = in.readInt();
}
use of com.hazelcast.internal.eviction.ExpiredKey in project hazelcast by hazelcast.
the class EvictBatchBackupOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
super.writeInternal(out);
out.writeString(name);
out.writeInt(expiredKeys.size());
for (ExpiredKey expiredKey : expiredKeys) {
IOUtil.writeData(out, expiredKey.getKey());
out.writeLong(expiredKey.getMetadata());
}
out.writeInt(primaryEntryCount);
}
Aggregations