protected AbstractEvictableRecordStore(MapContainer mapContainer, int partitionId) {
   super(mapContainer, partitionId);
   NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
   GroupProperties groupProperties = nodeEngine.getGroupProperties();
   expiryDelayMillis = groupProperties.getMillis(GroupProperty.MAP_EXPIRY_DELAY_SECONDS);
   evictor = mapContainer.getEvictor();
 }
예제 #2
0
  public void join() {
    if (joiner == null) {
      logger.warning("No join method is enabled! Starting standalone.");
      setAsMaster();
      return;
    }

    try {
      masterAddress = null;
      joined.set(false);
      clusterService.reset();

      joiner.join();
    } catch (Throwable e) {
      logger.severe("Error while joining the cluster!", e);
    }

    if (!joined()) {
      long maxJoinTimeMillis = groupProperties.getMillis(GroupProperty.MAX_JOIN_SECONDS);
      logger.severe("Could not join cluster in " + maxJoinTimeMillis + " ms. Shutting down now!");
      shutdownNodeByFiringEvents(Node.this, true);
    }
  }