PoolFactorySetThreadLocalConnections Method |
Enable ThreadLocalConnection.
Namespace: GemStone.GemFire.CacheAssembly: Gemstone.Gemfire.Cache (in Gemstone.Gemfire.Cache.dll) Version: 9.0.6.18
Syntaxpublic PoolFactory SetThreadLocalConnections(
bool enabled
)
Public Function SetThreadLocalConnections (
enabled As Boolean
) As PoolFactory
public:
PoolFactory^ SetThreadLocalConnections(
bool enabled
)
member SetThreadLocalConnections :
enabled : bool -> PoolFactory
Parameters
- enabled
- Type: SystemBoolean
Return Value
Type:
PoolFactory
Remarks
Sets the thread local connections policy for this pool.
If true then any time a thread goes to use a connection
from this pool it will check a thread local cache and see if it already
has a connection in it. If so it will use it. If not it will get one from
this pool and cache it in the thread local. This gets rid of thread contention
for the connections but increases the number of connections the servers see.
If false then connections are returned to the pool as soon
as the operation being done with the connection completes. This allows
connections to be shared amonst multiple threads keeping the number of
connections down.
See Also