protected final void invalidateAllKeysInNearCaches ( ) { if ( mapContainer . hasInvalidationListener ( ) ) { int partitionId = getPartitionId ( ) ; Invalidator invalidator = getNearCacheInvalidator ( ) ; if ( partitionId == getNodeEngine ( ) . getPartitionService ( ) . getPartitionId ( name ) ) { invalidator . invalidateAllKeys ( name , getCallerUuid ( ) ) ; } invalidator . resetPartitionMetaData ( name , getPartitionId ( ) ) ; } }
This method helps to add clearing Near Cache event only from one - partition which matches partitionId of the map name .