public class SpaceProxyPool extends Object
Constructor and Description |
---|
SpaceProxyPool(int capacity,
long expirationTime,
long waitingTimeout,
SpaceProxyPoolFactory spaceProxyPoolFactory)
Constructor for tests.
|
SpaceProxyPool(SpaceProxyPoolFactory spaceProxyPoolFactory) |
Modifier and Type | Method and Description |
---|---|
void |
clearConnectionPool()
Clear all connections from pool in case of openid IdP settings or roles in security service changed
|
void |
deleteLoggedOutSession(String sessionId)
When a session is logged out, remove all connections of this session
|
void |
evict()
Evict the connections which pass the expiration time.
|
long |
getExpirationTime() |
int |
getHashMapSize() |
GConnection |
getOrCreate(IJSpace ijSpace,
String sessionId,
Properties props)
Get connection for specific sessionId.
|
int |
getProxyCounter() |
boolean |
isSessionIdExists(String sessionId) |
void |
putBack(GConnection gConnection,
String sessionId,
String spaceName)
Put back the connection after usage
|
public SpaceProxyPool(SpaceProxyPoolFactory spaceProxyPoolFactory)
public SpaceProxyPool(int capacity, long expirationTime, long waitingTimeout, SpaceProxyPoolFactory spaceProxyPoolFactory)
public GConnection getOrCreate(IJSpace ijSpace, String sessionId, Properties props) throws SQLException, TimeoutException, SpaceProxyPoolException, InterruptedException
ijSpace
- sessionId
- props
- SQLException
TimeoutException
- if timeout reached while waiting for connectionSpaceProxyPoolException
- if the session expired while getting the connectionInterruptedException
public void putBack(GConnection gConnection, String sessionId, String spaceName) throws SpaceProxyPoolException
gConnection
- sessionId
- spaceName
- SpaceProxyPoolException
- if the session expired while getting the connectionpublic void evict() throws SQLException
SQLException
public void deleteLoggedOutSession(String sessionId)
sessionId
- public void clearConnectionPool()
public long getExpirationTime()
public int getProxyCounter()
public boolean isSessionIdExists(String sessionId)
public int getHashMapSize()
Copyright © GigaSpaces.