protected void prepareForNextCleanup() { MapService mapService = getService(); MapServiceContext mapServiceContext = mapService.getMapServiceContext(); PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(getPartitionId()); partitionContainer.setHasRunningCleanup(false); partitionContainer.setLastCleanupTime(Clock.currentTimeMillis()); }
protected void prepareForNextCleanup() { MapService mapService = getService(); MapServiceContext mapServiceContext = mapService.getMapServiceContext(); PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(getPartitionId()); partitionContainer.setHasRunningCleanup(false); partitionContainer.setLastCleanupTime(Clock.currentTimeMillis()); }
@Override public void run() throws Exception { if (getNodeEngine().getLocalMember().isLiteMember()) { // this operation shouldn't run on lite members. This situation can potentially be seen // when converting a data-member to lite-member during merge operations. return; } MapService mapService = getService(); MapServiceContext mapServiceContext = mapService.getMapServiceContext(); PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(getPartitionId()); ConcurrentMap<String, RecordStore> recordStores = partitionContainer.getMaps(); boolean backup = !isOwner(); for (final RecordStore recordStore : recordStores.values()) { if (recordStore.size() > 0 && recordStore.isExpirable()) { recordStore.evictExpiredEntries(expirationPercentage, backup); recordStore.disposeDeferredBlocks(); } } }
@Override public void run() throws Exception { if (getNodeEngine().getLocalMember().isLiteMember()) { // this operation shouldn't run on lite members. This situation can potentially be seen // when converting a data-member to lite-member during merge operations. return; } MapService mapService = getService(); MapServiceContext mapServiceContext = mapService.getMapServiceContext(); PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(getPartitionId()); ConcurrentMap<String, RecordStore> recordStores = partitionContainer.getMaps(); boolean backup = !isOwner(); for (final RecordStore recordStore : recordStores.values()) { if (recordStore.size() > 0 && recordStore.isExpirable()) { recordStore.evictExpiredEntries(expirationPercentage, backup); recordStore.disposeDeferredBlocks(); } } }