DecayRpcScheduler implements RpcScheduler,
    DecayRpcSchedulerMXBean, MetricsSource { @VisibleForTesting long getDecayPeriodMillis() { return decayPeriodMillis; } DecayRpcScheduler(int numLevels, String ns, Configuration conf); @Override int getPriorityLevel(Schedulable obj); @Override boolean shouldBackOff(Schedulable obj); @Override void addResponseTime(String callName, Schedulable schedulable,
      ProcessingDetails details); int getUniqueIdentityCount(); long getTotalCallVolume(); long getTotalRawCallVolume(); long getTotalServiceUserCallVolume(); long getTotalServiceUserRawCallVolume(); long[] getResponseTimeCountInLastWindow(); @Override double[] getAverageResponseTime(); @Override void getMetrics(MetricsCollector collector, boolean all); String getSchedulingDecisionSummary(); String getCallVolumeSummary(); @VisibleForTesting DecayRpcSchedulerDetailedMetrics getDecayRpcSchedulerDetailedMetrics(); @Override void stop(); static final String IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_KEY; static final long IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_DEFAULT; @Deprecated
  static final String IPC_FCQ_DECAYSCHEDULER_PERIOD_KEY; static final String IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_KEY; static final double IPC_SCHEDULER_DECAYSCHEDULER_FACTOR_DEFAULT; @Deprecated
  static final String IPC_FCQ_DECAYSCHEDULER_FACTOR_KEY; static final String IPC_DECAYSCHEDULER_THRESHOLDS_KEY; @Deprecated
  static final String IPC_FCQ_DECAYSCHEDULER_THRESHOLDS_KEY; static final String IPC_DECAYSCHEDULER_SERVICE_USERS_KEY; static final String DECAYSCHEDULER_UNKNOWN_IDENTITY; static final String IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_KEY; static final Boolean IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_ENABLE_DEFAULT; static final String IPC_DECAYSCHEDULER_BACKOFF_RESPONSETIME_THRESHOLDS_KEY; static final String DECAYSCHEDULER_METRICS_TOP_USER_COUNT; static final int DECAYSCHEDULER_METRICS_TOP_USER_COUNT_DEFAULT; static final Logger LOG; }
@Test @SuppressWarnings("deprecation") public void testParsePeriod() { scheduler = new DecayRpcScheduler(1, "ipc.1", new Configuration()); assertEquals(DecayRpcScheduler.IPC_SCHEDULER_DECAYSCHEDULER_PERIOD_DEFAULT, scheduler.getDecayPeriodMillis()); Configuration conf = new Configuration(); conf.setLong("ipc.2." + DecayRpcScheduler.IPC_FCQ_DECAYSCHEDULER_PERIOD_KEY, 1058); scheduler = new DecayRpcScheduler(1, "ipc.2", conf); assertEquals(1058L, scheduler.getDecayPeriodMillis()); }