DecayRpcScheduler implements RpcScheduler,
    DecayRpcSchedulerMXBean, MetricsSource { @Override public int getPriorityLevel(Schedulable obj) { String identity = this.identityProvider.makeIdentity(obj); if (identity == null) { identity = DECAYSCHEDULER_UNKNOWN_IDENTITY; } return cachedOrComputedPriorityLevel(identity); } 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 public void testUsingWeightedTimeCostProviderNoRequests() { scheduler = getSchedulerWithWeightedTimeCostProvider(2, "ipc.18"); assertEquals(0, scheduler.getPriorityLevel(mockCall("A"))); }