/** * Creates the {@link EventHandler} for handling the application events. */ @Nullable private EventHandler createEventHandler(CConfiguration cConf, ProgramRunId programRunId) { if (clusterMode != ClusterMode.ON_PREMISE) { return null; } return new TwillAppLifecycleEventHandler(cConf.getLong(Constants.CFG_TWILL_NO_CONTAINER_TIMEOUT, Long.MAX_VALUE), this instanceof LongRunningDistributedProgramRunner, programRunId); }
/** * Creates the {@link EventHandler} for handling the application events. */ @Nullable private EventHandler createEventHandler(CConfiguration cConf, ProgramRunId programRunId) { if (clusterMode != ClusterMode.ON_PREMISE) { return null; } return new TwillAppLifecycleEventHandler(cConf.getLong(Constants.CFG_TWILL_NO_CONTAINER_TIMEOUT, Long.MAX_VALUE), this instanceof LongRunningDistributedProgramRunner, programRunId); }