private static List<QuotaSettings> fromQuotas(final String userName, final TableName tableName, final String namespace, final String regionServer, final Quotas quotas) { List<QuotaSettings> settings = new ArrayList<>(); if (quotas.hasThrottle()) { settings .addAll(fromThrottle(userName, tableName, namespace, regionServer, quotas.getThrottle())); } if (quotas.getBypassGlobals() == true) { settings .add(new QuotaGlobalsSettingsBypass(userName, tableName, namespace, regionServer, true)); } if (quotas.hasSpace()) { settings.add(fromSpace(tableName, namespace, quotas.getSpace())); } return settings; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasBypassGlobals()) { hash = (37 * hash) + BYPASS_GLOBALS_FIELD_NUMBER; hash = (53 * hash) + org.apache.hbase.thirdparty.com.google.protobuf.Internal.hashBoolean( getBypassGlobals()); } if (hasThrottle()) { hash = (37 * hash) + THROTTLE_FIELD_NUMBER; hash = (53 * hash) + getThrottle().hashCode(); } if (hasSpace()) { hash = (37 * hash) + SPACE_FIELD_NUMBER; hash = (53 * hash) + getSpace().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
private static List<QuotaSettings> fromQuotas(final String userName, final TableName tableName, final String namespace, final Quotas quotas) { List<QuotaSettings> settings = new ArrayList<>(); if (quotas.hasThrottle()) { settings.addAll(fromThrottle(userName, tableName, namespace, quotas.getThrottle())); } if (quotas.getBypassGlobals() == true) { settings.add(new QuotaGlobalsSettingsBypass(userName, tableName, namespace, true)); } if (quotas.hasSpace()) { settings.add(fromSpace(tableName, namespace, quotas.getSpace())); } return settings; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas)) { return super.equals(obj); } org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas other = (org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas) obj; boolean result = true; result = result && (hasBypassGlobals() == other.hasBypassGlobals()); if (hasBypassGlobals()) { result = result && (getBypassGlobals() == other.getBypassGlobals()); } result = result && (hasThrottle() == other.hasThrottle()); if (hasThrottle()) { result = result && getThrottle() .equals(other.getThrottle()); } result = result && (hasSpace() == other.hasSpace()); if (hasSpace()) { result = result && getSpace() .equals(other.getSpace()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasBypassGlobals()) { hash = (37 * hash) + BYPASS_GLOBALS_FIELD_NUMBER; hash = (53 * hash) + org.apache.hbase.thirdparty.com.google.protobuf.Internal.hashBoolean( getBypassGlobals()); } if (hasThrottle()) { hash = (37 * hash) + THROTTLE_FIELD_NUMBER; hash = (53 * hash) + getThrottle().hashCode(); } if (hasSpace()) { hash = (37 * hash) + SPACE_FIELD_NUMBER; hash = (53 * hash) + getSpace().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas other) { if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas.getDefaultInstance()) return this; if (other.hasBypassGlobals()) { setBypassGlobals(other.getBypassGlobals()); } if (other.hasThrottle()) { mergeThrottle(other.getThrottle()); } if (other.hasSpace()) { mergeSpace(other.getSpace()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private static List<QuotaSettings> fromQuotas(final String userName, final TableName tableName, final String namespace, final Quotas quotas) { List<QuotaSettings> settings = new ArrayList<>(); if (quotas.hasThrottle()) { settings.addAll(fromThrottle(userName, tableName, namespace, quotas.getThrottle())); } if (quotas.getBypassGlobals() == true) { settings.add(new QuotaGlobalsSettingsBypass(userName, tableName, namespace, true)); } if (quotas.hasSpace()) { settings.add(fromSpace(tableName, namespace, quotas.getSpace())); } return settings; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas)) { return super.equals(obj); } org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas other = (org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas) obj; boolean result = true; result = result && (hasBypassGlobals() == other.hasBypassGlobals()); if (hasBypassGlobals()) { result = result && (getBypassGlobals() == other.getBypassGlobals()); } result = result && (hasThrottle() == other.hasThrottle()); if (hasThrottle()) { result = result && getThrottle() .equals(other.getThrottle()); } result = result && (hasSpace() == other.hasSpace()); if (hasSpace()) { result = result && getSpace() .equals(other.getSpace()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas other) { if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas.getDefaultInstance()) return this; if (other.hasBypassGlobals()) { setBypassGlobals(other.getBypassGlobals()); } if (other.hasThrottle()) { mergeThrottle(other.getThrottle()); } if (other.hasSpace()) { mergeSpace(other.getSpace()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public synchronized void setQuotas(final Quotas quotas) { super.setQuotas(quotas); bypassGlobals = quotas.getBypassGlobals(); }
protected GlobalQuotaSettingsImpl(String username, TableName tableName, String namespace, String regionServer, QuotaProtos.Quotas quotas) { this(username, tableName, namespace, regionServer, (quotas != null && quotas.hasThrottle() ? quotas.getThrottle() : null), (quotas != null && quotas.hasBypassGlobals() ? quotas.getBypassGlobals() : null), (quotas != null && quotas.hasSpace() ? quotas.getSpace() : null)); }