private void flushAndRemoveQueryCaches ( PartitionMigrationEvent event ) { int partitionId = event . getPartitionId ( ) ; QueryCacheContext queryCacheContext = mapServiceContext . getQueryCacheContext ( ) ; PublisherContext publisherContext = queryCacheContext . getPublisherContext ( ) ; if ( event . getMigrationEndpoint ( ) == MigrationEndpoint . SOURCE ) { flushAccumulator ( publisherContext , partitionId ) ; removeAccumulator ( publisherContext , partitionId ) ; return ; } if ( isLocalPromotion ( event ) ) { removeAccumulator ( publisherContext , partitionId ) ; sendEndOfSequenceEvents ( publisherContext , partitionId ) ; return ; } }
Flush and remove query cache on this source partition .