public Row purge(DeletionPurger purger, int nowInSec) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
public Row purge(DeletionPurger purger, int nowInSec, boolean enforceStrictLiveness) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; // when enforceStrictLiveness is set, a row is considered dead when it's PK liveness info is not present if (enforceStrictLiveness && newDeletion.isLive() && newInfo.isEmpty()) return null; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
public Row purge(DeletionPurger purger, int nowInSec, boolean enforceStrictLiveness) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; // when enforceStrictLiveness is set, a row is considered dead when it's PK liveness info is not present if (enforceStrictLiveness && newDeletion.isLive() && newInfo.isEmpty()) return null; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }
public Row purge(DeletionPurger purger, int nowInSec, boolean enforceStrictLiveness) { if (!hasDeletion(nowInSec)) return this; LivenessInfo newInfo = purger.shouldPurge(primaryKeyLivenessInfo, nowInSec) ? LivenessInfo.EMPTY : primaryKeyLivenessInfo; Deletion newDeletion = purger.shouldPurge(deletion.time()) ? Deletion.LIVE : deletion; // when enforceStrictLiveness is set, a row is considered dead when it's PK liveness info is not present if (enforceStrictLiveness && newDeletion.isLive() && newInfo.isEmpty()) return null; return transformAndFilter(newInfo, newDeletion, (cd) -> cd.purge(purger, nowInSec)); }