public class SocketPool extends java.lang.Object implements java.lang.Runnable, TransportProviderI
Modifier and Type | Field and Description |
---|---|
static java.util.concurrent.ExecutorService |
EXECUTOR |
static org.apache.log4j.Logger |
log |
static int |
MAINTAIN_POOL_INTERVAL |
static int |
MAX_WAIT_ON_PENSIONEERS |
static org.apache.log4j.Logger |
rtlog |
Constructor and Description |
---|
SocketPool(ServerConnectionI _serverConnection) |
Modifier and Type | Method and Description |
---|---|
de.ipcon.db.protocol.socket.SocketPool.Data |
getData() |
int |
getRoundtrips()
Returns the current number of client-server roundtrips.
|
java.util.concurrent.atomic.AtomicInteger |
getRoundtripsInternal() |
ServerConnectionI |
getServerConnection()
A class for maintaining and interacting with all necessary data structures for handling PooledSockets in a SocketPool.
|
java.lang.Long |
getSessionId(boolean blockUntilAvailable)
Returns the Id of the current server-connection.
|
TransportI |
getTransport(java.lang.String reason,
boolean needAuth)
Returns a usable TransportI for client-server communication.
|
boolean |
isAboutToStop()
Returns true, if this TransportProviderI will stop soon, false otherwise.
|
boolean |
isDead() |
boolean |
isNew()
Returns true, if this SocketPool is still new.
|
boolean |
isStopped()
Returns true, if this TransportProviderI is stopped, false otherwise.
|
boolean |
performMaintenance()
Forces a performance run on the managed TransportI-s.
|
void |
releaseTransport(TransportI t,
java.lang.Exception e)
Releases the passed TransportI again.
|
void |
run()
Run method for performing regular maintenance on this SocketPool.
|
void |
setRoundtripsInternal(java.util.concurrent.atomic.AtomicInteger $20) |
void |
setServerConnection(ServerConnectionI $19) |
void |
startWorker()
Starts the worker thread of this TransportProviderI, which performs maintenance on the managed TransportI-s.
|
void |
stop()
Stops this TransportProviderI and terminates all TransportI-s.
|
void |
stop(boolean noJoin) |
java.lang.String |
toString() |
public static final org.apache.log4j.Logger log
public static final org.apache.log4j.Logger rtlog
public static final java.util.concurrent.ExecutorService EXECUTOR
public static int MAINTAIN_POOL_INTERVAL
public static int MAX_WAIT_ON_PENSIONEERS
public SocketPool(ServerConnectionI _serverConnection)
public int getRoundtrips()
TransportProviderI
getRoundtrips
in interface TransportProviderI
public java.lang.Long getSessionId(boolean blockUntilAvailable)
TransportProviderI
getSessionId
in interface TransportProviderI
public TransportI getTransport(java.lang.String reason, boolean needAuth) throws ServerConnectionException
TransportProviderI
getTransport
in interface TransportProviderI
ServerConnectionException
public void releaseTransport(TransportI t, java.lang.Exception e) throws ServerConnectionException, java.lang.IllegalStateException
TransportProviderI
releaseTransport
in interface TransportProviderI
ServerConnectionException
java.lang.IllegalStateException
public void startWorker()
TransportProviderI
startWorker
in interface TransportProviderI
public boolean performMaintenance()
TransportProviderI
performMaintenance
in interface TransportProviderI
public void stop()
TransportProviderI
stop
in interface TransportProviderI
public void stop(boolean noJoin)
public boolean isAboutToStop()
TransportProviderI
isAboutToStop
in interface TransportProviderI
public boolean isStopped()
TransportProviderI
isStopped
in interface TransportProviderI
public boolean isDead()
public boolean isNew()
public java.lang.String toString()
toString
in class java.lang.Object
public void run()
run
in interface java.lang.Runnable
public de.ipcon.db.protocol.socket.SocketPool.Data getData()
public ServerConnectionI getServerConnection()
public void setServerConnection(ServerConnectionI $19)
public java.util.concurrent.atomic.AtomicInteger getRoundtripsInternal()
public void setRoundtripsInternal(java.util.concurrent.atomic.AtomicInteger $20)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.