builder.append(timeToString(ProtobufUtil.toTimeUnit(timedQuota.getTimeUnit()))); if (timedQuota.hasScope()) { builder.append(", SCOPE => ");
builder.append(timeToString(ProtobufUtil.toTimeUnit(timedQuota.getTimeUnit()))); if (timedQuota.hasScope()) { builder.append(", SCOPE => ");
private void assertRPCQuota(ThrottleType type, long limit, TimeUnit tu, QuotaSettings actualSettings) throws Exception { assertTrue( "The actual QuotaSettings was not an instance of " + ThrottleSettings.class + " but of " + actualSettings.getClass(), actualSettings instanceof ThrottleSettings); QuotaProtos.ThrottleRequest throttleRequest = ((ThrottleSettings) actualSettings).getProto(); assertEquals(limit, throttleRequest.getTimedQuota().getSoftLimit()); assertEquals(ProtobufUtil.toProtoTimeUnit(tu), throttleRequest.getTimedQuota().getTimeUnit()); assertEquals(ProtobufUtil.toProtoThrottleType(type), throttleRequest.getType()); }
builder.append(timeToString(ProtobufUtil.toTimeUnit(timedQuota.getTimeUnit()))); if (timedQuota.hasScope()) { builder.append(", SCOPE => ");
assertEquals(t.getTimeUnit(), ProtobufUtil.toProtoTimeUnit(tu));
public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota other) { if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota.getDefaultInstance()) return this; if (other.hasTimeUnit()) { setTimeUnit(other.getTimeUnit()); } if (other.hasSoftLimit()) { setSoftLimit(other.getSoftLimit()); } if (other.hasShare()) { setShare(other.getShare()); } if (other.hasScope()) { setScope(other.getScope()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public TimeUnit getTimeUnit() { return proto.hasTimedQuota() ? ProtobufUtil.toTimeUnit(proto.getTimedQuota().getTimeUnit()) : null; }
private void assertRPCQuota(ThrottleType type, long limit, TimeUnit tu, QuotaSettings actualSettings) throws Exception { assertTrue( "The actual QuotaSettings was not an instance of " + ThrottleSettings.class + " but of " + actualSettings.getClass(), actualSettings instanceof ThrottleSettings); QuotaProtos.ThrottleRequest throttleRequest = ((ThrottleSettings) actualSettings).getProto(); assertEquals(limit, throttleRequest.getTimedQuota().getSoftLimit()); assertEquals(ProtobufUtil.toProtoTimeUnit(tu), throttleRequest.getTimedQuota().getTimeUnit()); assertEquals(ProtobufUtil.toProtoThrottleType(type), throttleRequest.getType()); }
builder.append(timeToString(ProtobufUtil.toTimeUnit(timedQuota.getTimeUnit()))); if (timedQuota.hasScope()) { builder.append(", SCOPE => ");
public TimeUnit getTimeUnit() { return proto.hasTimedQuota() ? ProtobufUtil.toTimeUnit(proto.getTimedQuota().getTimeUnit()) : null; }
assertEquals(t.getTimeUnit(), ProtobufUtil.toProtoTimeUnit(tu));
public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota other) { if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota.getDefaultInstance()) return this; if (other.hasTimeUnit()) { setTimeUnit(other.getTimeUnit()); } if (other.hasSoftLimit()) { setSoftLimit(other.getSoftLimit()); } if (other.hasShare()) { setShare(other.getShare()); } if (other.hasScope()) { setScope(other.getScope()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private static void setFromTimedQuota(final RateLimiter limiter, final TimedQuota timedQuota) { limiter.set(timedQuota.getSoftLimit(), ProtobufUtil.toTimeUnit(timedQuota.getTimeUnit())); }
public TimeUnit getTimeUnit() { return proto.hasTimedQuota() ? ProtobufUtil.toTimeUnit(proto.getTimedQuota().getTimeUnit()) : null; }