@Override
 public void run() {
   LockServiceImpl lockService = getService();
   LockStoreContainer container = lockService.getLockContainer(getPartitionId());
   for (LockStoreImpl ls : locks) {
     container.put(ls);
   }
 }
Ejemplo n.º 2
0
  protected MapProxySupport(
      String name, MapService service, NodeEngine nodeEngine, MapConfig mapConfig) {
    super(nodeEngine, service);
    this.name = name;

    HazelcastProperties properties = nodeEngine.getProperties();

    this.mapServiceContext = service.getMapServiceContext();
    this.mapConfig = mapConfig;
    this.partitionStrategy =
        PartitioningStrategyFactory.getPartitioningStrategy(
            nodeEngine, mapConfig.getName(), mapConfig.getPartitioningStrategyConfig());
    this.localMapStats = mapServiceContext.getLocalMapStatsProvider().getLocalMapStatsImpl(name);
    this.partitionService = getNodeEngine().getPartitionService();
    this.lockSupport =
        new LockProxySupport(
            new DefaultObjectNamespace(SERVICE_NAME, name),
            LockServiceImpl.getMaxLeaseTimeInMillis(properties));
    this.operationProvider = mapServiceContext.getMapOperationProvider(name);
    this.operationService = nodeEngine.getOperationService();
    this.serializationService = nodeEngine.getSerializationService();
    this.thisAddress = nodeEngine.getClusterService().getThisAddress();
    this.statisticsEnabled = mapConfig.isStatisticsEnabled();

    this.putAllBatchSize = properties.getInteger(MAP_PUT_ALL_BATCH_SIZE);
    this.putAllInitialSizeFactor = properties.getFloat(MAP_PUT_ALL_INITIAL_SIZE_FACTOR);
  }