Constructs an instance of BigtableTableAdminClient with the given instanceName and stub.
341578
public static BigtableTableAdminClient create(
      @Nonnull String projectId,
      @Nonnull String instanceId,
      @Nonnull EnhancedBigtableTableAdminStub stub) {
    return new BigtableTableAdminClient(projectId, instanceId, stub);
  }
832557
public synchronized BigtableInstanceClient getInstanceAdminClient() throws IOException {
    if (instanceAdminClient == null) {
      ManagedChannel channel = createManagedPool(options.getAdminHost(), 1);
      instanceAdminClient = new BigtableInstanceGrpcClient(channel);
    }
    return instanceAdminClient;
  }
1182255
def instance(cls, name):
        
        if not cls._instance.get(name):
            model_name = name.split('.')
            ins_name = '.'.join(
                ['models', model_name[0], 'model', model_name[1]])
            cls._instance[name] = cls.import_model(ins_name)()

        return cls._instance[name]
573714
public function build(): RequestDatabaseNamesRequest
	{
		$instance = new RequestDatabaseNamesRequest();
		if ($this->securityOrigin === null) {
			throw new BuilderException('Property [securityOrigin] is required.');
		}
		$instance->securityOrigin = $this->securityOrigin;
		return $instance;
	}
749519
public static BigtableOptions fromConfiguration(final Configuration configuration)
      throws IOException {

    BigtableOptions.Builder bigtableOptionsBuilder = BigtableOptions.builder();

    bigtableOptionsBuilder.setProjectId(getValue(configuration, PROJECT_ID_KEY, "Project ID"));
    bigtableOptionsBuilder.setInstanceId(getValue(configuration, INSTANCE_ID_KEY, "Instance ID"));
    String appProfileId = configuration.get(APP_PROFILE_ID_KEY, null);
    if (appProfileId != null) {
      bigtableOptionsBuilder.setAppProfileId(appProfileId);
    }

    bigtableOptionsBuilder.setDataHost(
        getHost(configuration, BIGTABLE_HOST_KEY, BIGTABLE_DATA_HOST_DEFAULT, "API Data"));

    bigtableOptionsBuilder.setAdminHost(getHost(
      configuration, BIGTABLE_ADMIN_HOST_KEY, BIGTABLE_ADMIN_HOST_DEFAULT,
      "Admin"));

    int port = configuration.getInt(BIGTABLE_PORT_KEY, BIGTABLE_PORT_DEFAULT);
    bigtableOptionsBuilder.setPort(port);
    bigtableOptionsBuilder.setUsePlaintextNegotiation(
      configuration.getBoolean(BIGTABLE_USE_PLAINTEXT_NEGOTIATION, false));

    setBulkOptions(configuration, bigtableOptionsBuilder);
    setChannelOptions(configuration, bigtableOptionsBuilder);
    setClientCallOptions(configuration, bigtableOptionsBuilder);

    String emulatorHost = configuration.get(BIGTABLE_EMULATOR_HOST_KEY);
    if (emulatorHost != null) {
      bigtableOptionsBuilder.enableEmulator(emulatorHost);
    }
    bigtableOptionsBuilder.setUseBatch(configuration.getBoolean(BIGTABLE_USE_BATCH, false));

    bigtableOptionsBuilder.setUseGCJClient(configuration.getBoolean(BIGTABLE_USE_GCJ_CLIENT,
        false));
    return bigtableOptionsBuilder.build();
  }
53960
public void registerInstance(ProvidedServiceInstance instance){
        String body = _serialize(instance);
        HttpResponse result = invoker.invoke(toInstanceUri(instance.getServiceName(), instance.getProviderId()), body,
                HttpMethod.POST);

        if (result.getHttpCode() != HTTP_CREATED) {
            throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
                    "HTTP Code is not OK, code=%s",result.getHttpCode());
        }
    }
1228715
public function build(): GetDatabaseTableNamesRequest
	{
		$instance = new GetDatabaseTableNamesRequest();
		if ($this->databaseId === null) {
			throw new BuilderException('Property [databaseId] is required.');
		}
		$instance->databaseId = $this->databaseId;
		return $instance;
	}
1224922
protected static AbatisService getInstance(Context context, int version) {
      if (instance == null) {
         instance = new AbatisService(context, version);
      }
      return instance;
   }
1249123
protected function replaceTableName(&$stub)
    {
        $table = $this->scaffoldCommandObj->getMeta()['table'];
        $stub = str_replace('{{table}}', $table, $stub);

        return $this;
    }
246402
public void deleteInstance() {
    System.out.println("\nDeleting Instance");
    // [START bigtable_delete_instance]
    try {
      adminClient.deleteInstance(instanceId);
      System.out.println("Instance deleted: " + instanceId);
    } catch (NotFoundException e) {
      System.err.println("Failed to delete non-existent instance: " + e.getMessage());
    }
    // [END bigtable_delete_instance]
  }
405896
private Service initService(String serviceName) {
        m_logger.debug("Initializing service: " + serviceName);
        try {
            @SuppressWarnings("unchecked")
            Class<Service> serviceClass = (Class<Service>) Class.forName(serviceName);
            Method instanceMethod = serviceClass.getMethod("instance", (Class<?>[])null);
            Service instance = (Service)instanceMethod.invoke(null, (Object[])null);
            instance.initialize();
            return instance;
        } catch (Exception e) {
            throw new RuntimeException("Error initializing service: " + serviceName, e);
        }
    }
259885
private Object getJavaObjectInstance(Context c, Hashtable<?, ?> envmt, String className, String bindingName, ResourceInfo resourceRefInfo, IndirectReference ref) throws Exception {
        // Return null if we don't find a binding so that the caller can
        // use JNDI if enabled.
        Object resource = null;

        NamingConstants.JavaColonNamespace namespace = NamingConstants.JavaColonNamespace.match(bindingName);
        if (namespace != null) {
            ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
            if (cmd != null) {
                OSGiInjectionScopeData isd = injectionEngine.getInjectionScopeData(cmd, namespace);
                if (isd != null) {
                    String name = namespace.unprefix(bindingName);

                    InjectionBinding<?> binding = isd.getInjectionBinding(namespace, name);
                    if (binding == null && isd.processDeferredReferenceData()) {
                        // Try again after processing deferred reference data.
                        binding = isd.getInjectionBinding(namespace, name);
                    }

                    if (binding != null) {
                        resource = getBindingObjectInstance(c, envmt, className, resourceRefInfo, ref, binding);
                    }
                }
            }

            if (resource == null && namespace == NamingConstants.JavaColonNamespace.COMP) {
                resource = getDefaultJavaCompObjectInstance(namespace, bindingName, resourceRefInfo);
            }

            // If not found and the customer did not provide a binding, then try and
            // auto-link to a resource that matches on name in the service registry.
            if (resource == null && ref.defaultBinding && !ref.name.startsWith("java:")) {
                resource = createResource(ref.name, className, ref.name, resourceRefInfo);
            }
        }

        return resource;
    }
477414
public Table createTable(String tableName,
            List<KeySchemaElement> keySchema,
            List<AttributeDefinition> attributeDefinitions,
            ProvisionedThroughput provisionedThroughput) {
        return createTable(new CreateTableRequest()
            .withTableName(tableName)
            .withKeySchema(keySchema)
            .withAttributeDefinitions(attributeDefinitions)
            .withProvisionedThroughput(provisionedThroughput));
    }
296104
@NonNull
  public static CreateTableStart createTable(@NonNull String tableName) {
    return createTable(CqlIdentifier.fromCql(tableName));
  }
780261
public static Object buildObjectInstance(String classname) {

		Class<?> clazz = getClass(classname);
		return buildObjectInstance(clazz);
	}
809434
function (name) {
    if (!this.instances[name]) {
      this.instances[name] = DevFixturesModel.create({name: name});
    }
    return this.instances[name];
  }
15513
protected static AbatisService getInstance(Context context, String dbName, int version) {
      if (instance == null) {
         instance = new AbatisService(context, dbName, version);
      }
      return instance;
   }