/** * Create a session pool with the given options and for the given database. It will also start * eagerly creating sessions if {@link SessionPoolOptions#getMinSessions()} is greater than 0. * Return pool is immediately ready for use, though getting a session might block for sessions to * be created. */ static SessionPool createPool(SpannerOptions spannerOptions, DatabaseId db, SpannerImpl spanner) { return createPool( spannerOptions.getSessionPoolOptions(), ((GrpcTransportOptions) spannerOptions.getTransportOptions()).getExecutorFactory(), db, spanner); }
@Test public void testBuilder() { assertSame(MOCK_EXECUTOR_FACTORY, OPTIONS.getExecutorFactory()); assertTrue(DEFAULT_OPTIONS.getExecutorFactory() instanceof DefaultExecutorFactory); }
public GrpcFirestoreRpc(final FirestoreOptions options) throws IOException { GrpcTransportOptions transportOptions = (GrpcTransportOptions) options.getTransportOptions(); executorFactory = transportOptions.getExecutorFactory(); executor = executorFactory.get(); try {
public GrpcLoggingRpc(final LoggingOptions options) throws IOException { GrpcTransportOptions transportOptions = (GrpcTransportOptions) options.getTransportOptions(); executorFactory = transportOptions.getExecutorFactory(); executor = executorFactory.get(); try {
/** * Create a session pool with the given options and for the given database. It will also start * eagerly creating sessions if {@link SessionPoolOptions#getMinSessions()} is greater than 0. * Return pool is immediately ready for use, though getting a session might block for sessions to * be created. */ static SessionPool createPool(SpannerOptions spannerOptions, DatabaseId db, SpannerImpl spanner) { return createPool( spannerOptions.getSessionPoolOptions(), ((GrpcTransportOptions) spannerOptions.getTransportOptions()).getExecutorFactory(), db, spanner); }
public GrpcFirestoreRpc(final FirestoreOptions options) throws IOException { GrpcTransportOptions transportOptions = (GrpcTransportOptions) options.getTransportOptions(); executorFactory = transportOptions.getExecutorFactory(); executor = executorFactory.get(); try {
public GrpcLoggingRpc(final LoggingOptions options) throws IOException { GrpcTransportOptions transportOptions = (GrpcTransportOptions) options.getTransportOptions(); executorFactory = transportOptions.getExecutorFactory(); executor = executorFactory.get(); try {