private boolean isRecordStoreExpirable(IMap map) {
   MapProxyImpl mapProxy = (MapProxyImpl) map;
   MapService mapService = (MapService) mapProxy.getService();
   MapServiceContext mapServiceContext = (MapServiceContext) mapService.getMapServiceContext();
   PartitionContainer container = mapServiceContext.getPartitionContainer(0);
   RecordStore recordStore = container.getExistingRecordStore(map.getName());
   return recordStore.isExpirable();
 }
Esempio n. 2
0
 private Data readBackupDataOrNull(Data key) {
   int partitionId = partitionService.getPartitionId(key);
   IPartition partition = partitionService.getPartition(partitionId, false);
   if (!partition.isOwnerOrBackup(thisAddress)) {
     return null;
   }
   PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(partitionId);
   RecordStore recordStore = partitionContainer.getExistingRecordStore(name);
   if (recordStore == null) {
     return null;
   }
   return recordStore.readBackupData(key);
 }
Esempio n. 3
0
 private RecordStore getRecordStoreOrNull(String mapName, int partitionId) {
   final PartitionContainer partitionContainer =
       mapServiceContext.getPartitionContainer(partitionId);
   return partitionContainer.getExistingRecordStore(mapName);
 }