@Test public void canTemporarilySwitchToScheduledTimer() throws Exception { try (ManuallyScheduleHeartbeat.Resource h = new ManuallyScheduleHeartbeat.Resource(ImmutableList.of(HeartbeatContext.WORKER_CLIENT))) { assertTrue(HeartbeatContext.getTimerClass(HeartbeatContext.WORKER_CLIENT) .isAssignableFrom(ScheduledTimer.class)); } assertTrue(HeartbeatContext.getTimerClass(HeartbeatContext.WORKER_CLIENT) .isAssignableFrom(SleepingTimer.class)); }
public static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name) { return sTimerClasses.get(name); }
HeartbeatContext { public static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name) { return sTimerClasses.get(name); } }
HeartbeatContext { public static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name) { return sTimerClasses.get(name); } private  HeartbeatContext(); }
HeartbeatContext { public static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name) { return sTimerClasses.get(name); } private  HeartbeatContext(); static synchronized Map<String, Class<? extends HeartbeatTimer>> getTimerClasses(); static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name); }
HeartbeatContext { public static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name) { return sTimerClasses.get(name); } private  HeartbeatContext(); static synchronized Map<String, Class<? extends HeartbeatTimer>> getTimerClasses(); static synchronized Class<? extends HeartbeatTimer> getTimerClass(String name); static final Class<? extends HeartbeatTimer> SCHEDULED_TIMER_CLASS; static final Class<? extends HeartbeatTimer> SLEEPING_TIMER_CLASS; static final String JOB_MASTER_LOST_WORKER_DETECTION; static final String JOB_WORKER_COMMAND_HANDLING; static final String MASTER_PERSISTENCE_CHECKER; static final String MASTER_PERSISTENCE_SCHEDULER; static final String MASTER_REPLICATION_CHECK; static final String MASTER_BLOCK_INTEGRITY_CHECK; static final String MASTER_CLUSTER_METRICS_UPDATER; static final String MASTER_CHECKPOINT_SCHEDULING; static final String MASTER_DAILY_BACKUP; static final String MASTER_FILE_RECOMPUTATION; static final String MASTER_LOG_CONFIG_REPORT_SCHEDULING; static final String MASTER_LOST_FILES_DETECTION; static final String MASTER_LOST_MASTER_DETECTION; static final String MASTER_LOST_WORKER_DETECTION; static final String MASTER_ORPHANED_METRICS_CLEANER; static final String MASTER_METRICS_SYNC; static final String MASTER_METRICS_TIME_SERIES; static final String MASTER_UFS_CLEANUP; static final String MASTER_UPDATE_CHECK; static final String MASTER_TTL_CHECK; static final String MASTER_ACTIVE_UFS_SYNC; static final String MASTER_TABLE_TRANSFORMATION_MONITOR; static final String META_MASTER_SYNC; static final String WORKER_BLOCK_SYNC; static final String WORKER_CLIENT; static final String WORKER_FILESYSTEM_MASTER_SYNC; static final String WORKER_PIN_LIST_SYNC; static final String WORKER_SPACE_RESERVER; static final String WORKER_STORAGE_HEALTH; }