public static class SessionPoolOptions.Builder extends Object
| Constructor and Description | 
|---|
| Builder() | 
| Modifier and Type | Method and Description | 
|---|---|
| SessionPoolOptions | build()Build a SessionPoolOption object | 
| SessionPoolOptions.Builder | setBlockIfPoolExhausted()If all sessions are in use and there is no more room for creating new sessions, block for a
 session to become available. | 
| SessionPoolOptions.Builder | setFailIfPoolExhausted()If all sessions are in use and and  maxSessionshas been reached, fail the request by
 throwing aSpannerExceptionwith the error codeRESOURCE_EXHAUSTED. | 
| SessionPoolOptions.Builder | setKeepAliveIntervalMinutes(int intervalMinutes)How frequently to keep alive idle sessions. | 
| SessionPoolOptions.Builder | setMaxIdleSessions(int maxIdleSessions)Maximum number of idle sessions that this pool will maintain. | 
| SessionPoolOptions.Builder | setMaxSessions(int maxSessions)Maximum number of sessions that this pool will have. | 
| SessionPoolOptions.Builder | setMinSessions(int minSessions)Minimum number of sessions that this pool will always maintain. | 
| SessionPoolOptions.Builder | setWriteSessionsFraction(float writeSessionsFraction)Fraction of sessions to be kept prepared for write transactions. | 
public SessionPoolOptions.Builder setMinSessions(int minSessions)
public SessionPoolOptions.Builder setMaxSessions(int maxSessions)
public SessionPoolOptions.Builder setMaxIdleSessions(int maxIdleSessions)
setMinSessions(int). To determine how many sessions are idle we look at maximum number of
 sessions used concurrently over a window of time. Any sessions beyond that are idle. Defaults
 to 0.public SessionPoolOptions.Builder setKeepAliveIntervalMinutes(int intervalMinutes)
public SessionPoolOptions.Builder setFailIfPoolExhausted()
maxSessions has been reached, fail the request by
 throwing a SpannerException with the error code RESOURCE_EXHAUSTED. Default
 behavior is to block the request.public SessionPoolOptions.Builder setBlockIfPoolExhausted()
public SessionPoolOptions.Builder setWriteSessionsFraction(float writeSessionsFraction)
Default value is 0.2.
public SessionPoolOptions build()
Copyright © 2019 Google LLC. All rights reserved.