static QuotaSettings fromSpace(TableName table, String namespace, SpaceQuota protoQuota) { if (protoQuota == null) { return null; } if ((table == null && namespace == null) || (table != null && namespace != null)) { throw new IllegalArgumentException( "Can only construct SpaceLimitSettings for a table or namespace."); } if (table != null) { if (protoQuota.getRemove()) { return new SpaceLimitSettings(table); } return SpaceLimitSettings.fromSpaceQuota(table, protoQuota); } else { if (protoQuota.getRemove()) { return new SpaceLimitSettings(namespace); } // namespace must be non-null return SpaceLimitSettings.fromSpaceQuota(namespace, protoQuota); } }
static QuotaSettings fromSpace(TableName table, String namespace, SpaceQuota protoQuota) { if (protoQuota == null) { return null; } if ((table == null && namespace == null) || (table != null && namespace != null)) { throw new IllegalArgumentException( "Can only construct SpaceLimitSettings for a table or namespace."); } if (table != null) { if (protoQuota.getRemove()) { return new SpaceLimitSettings(table); } return SpaceLimitSettings.fromSpaceQuota(table, protoQuota); } else { if (protoQuota.getRemove()) { return new SpaceLimitSettings(namespace); } // namespace must be non-null return SpaceLimitSettings.fromSpaceQuota(namespace, protoQuota); } }
static QuotaSettings fromSpace(TableName table, String namespace, SpaceQuota protoQuota) { if (protoQuota == null) { return null; } if ((table == null && namespace == null) || (table != null && namespace != null)) { throw new IllegalArgumentException( "Can only construct SpaceLimitSettings for a table or namespace."); } if (table != null) { if (protoQuota.getRemove()) { return new SpaceLimitSettings(table); } return SpaceLimitSettings.fromSpaceQuota(table, protoQuota); } else { if (protoQuota.getRemove()) { return new SpaceLimitSettings(namespace); } // namespace must be non-null return SpaceLimitSettings.fromSpaceQuota(namespace, protoQuota); } }