BigtableOptions implements Serializable, Cloneable { @Override public boolean equals(Object obj) { if (obj == null || obj.getClass() != BigtableOptions.class) { return false; } if (obj == this) { return true; } BigtableOptions other = (BigtableOptions) obj; return (port == other.port) && (dataChannelCount == other.dataChannelCount) && (usePlaintextNegotiation == other.usePlaintextNegotiation) && (useCachedDataPool == other.useCachedDataPool) && Objects.equals(adminHost, other.adminHost) && Objects.equals(dataHost, other.dataHost) && Objects.equals(projectId, other.projectId) && Objects.equals(instanceId, other.instanceId) && Objects.equals(appProfileId, other.appProfileId) && Objects.equals(userAgent, other.userAgent) && Objects.equals(credentialOptions, other.credentialOptions) && Objects.equals(retryOptions, other.retryOptions) && Objects.equals(bulkOptions, other.bulkOptions) && Objects.equals(callOptionsConfig, other.callOptionsConfig) && Objects.equals(useBatch, other.useBatch) && Objects.equals(useGCJClient, other.useGCJClient) && Objects.equals(channelConfigurator, other.channelConfigurator); } @VisibleForTesting  BigtableOptions(); static BigtableOptions getDefaultOptions(); @InternalApi("For internal use only") static boolean isDirectPathEnabled(); static Builder builder(); String getProjectId(); String getDataHost(); String getAdminHost(); String getInstanceId(); String getAppProfileId(); int getPort(); CredentialOptions getCredentialOptions(); String getUserAgent(); RetryOptions getRetryOptions(); int getChannelCount(); @InternalApi("Visible for testing only") @Nullable ChannelConfigurator getChannelConfigurator(); BigtableInstanceName getInstanceName(); BulkOptions getBulkOptions(); boolean usePlaintextNegotiation(); CallOptionsConfig getCallOptionsConfig(); @BetaApi("Will be removed after hbase transitions away from bigtable-client-core") boolean useGCJClient(); @Override boolean equals(Object obj); @Override String toString(); Builder toBuilder(); boolean useCachedChannel(); boolean useBatch(); @InternalApi("For internal usage only")
  static final String BIGTABLE_EMULATOR_HOST_ENV_VAR; @InternalApi("For internal usage only")
  static final String BIGTABLE_ADMIN_HOST_DEFAULT; @InternalApi("For internal usage only")
  static final String BIGTABLE_DATA_HOST_DEFAULT; @InternalApi("For internal usage only")
  static final String BIGTABLE_BATCH_DATA_HOST_DEFAULT; @InternalApi("For internal usage only")
  static final int BIGTABLE_PORT_DEFAULT; @InternalApi("For internal usage only")
  static final int BIGTABLE_DATA_CHANNEL_COUNT_DEFAULT; @InternalApi("For internal usage only")
  static final String BIGTABLE_APP_PROFILE_DEFAULT; @Deprecated static final String BIGTABLE_CLIENT_ADAPTER; }
@Test public void testEquals() { BigtableOptions options1 = BigtableOptions.builder() .setProjectId("project") .setInstanceId("instance") .setUserAgent("foo") .setCredentialOptions(CredentialOptions.nullCredential()) .build(); BigtableOptions options2 = BigtableOptions.builder() .setProjectId("project") .setInstanceId("instance") .setUserAgent("foo") .setCredentialOptions(CredentialOptions.nullCredential()) .build(); BigtableOptions options3 = BigtableOptions.builder() .setProjectId("project") .setInstanceId("instance") .setUserAgent("foo1") .setCredentialOptions(CredentialOptions.nullCredential()) .build(); BigtableOptions options4 = BigtableOptions.builder() .setProjectId("project") .setInstanceId("instance") .setUserAgent("foo1") .setCredentialOptions(CredentialOptions.defaultCredentials()) .build(); Assert.assertEquals(options1, options2); Assert.assertNotEquals(options1, options3); Assert.assertNotEquals(options1, options4); }