|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.invocation.pooled.interfaces.PooledInvokerProxy
public class PooledInvokerProxy
Client socket connections are pooled to avoid the overhead of making a connection. RMI seems to do a new connection with each request.
Nested Class Summary | |
---|---|
protected static class |
PooledInvokerProxy.ClientSocket
An encapsulation of a client connection |
Field Summary | |
---|---|
protected ServerAddress |
address
connection information |
protected static Map |
connectionPools
A class wide pool Map |
static long |
deserializeTime
|
static long |
getSocketTime
|
static int |
MAX_RETRIES
Set number of retries in getSocket method |
protected int |
maxPoolSize
|
protected LinkedList |
pool
Pool for this invoker. |
static long |
readTime
|
protected int |
retryCount
The number of times to retry after seeing a ConnectionException |
static long |
serializeTime
|
protected static org.jboss.tm.TransactionPropagationContextFactory |
tpcFactory
Factory for transaction propagation contexts. |
static long |
usedPooled
The number of times a connection has been obtained from a pool |
static long |
writeTime
|
Fields inherited from interface org.jboss.invocation.Invoker |
---|
ID |
Constructor Summary | |
---|---|
PooledInvokerProxy()
Exposed for externalization. |
|
PooledInvokerProxy(ServerAddress sa,
int maxPoolSize)
Create a new Proxy. |
|
PooledInvokerProxy(ServerAddress sa,
int maxPoolSize,
int retryCount)
|
Method Summary | |
---|---|
static void |
clearPool(ServerAddress sa)
Close all sockets in a specific pool. |
static void |
clearPools()
Close all sockets in all pools |
static void |
clearStats()
Clear all class level stats |
protected PooledInvokerProxy.ClientSocket |
getConnection()
|
static long |
getInUseCount()
|
long |
getPoolCount()
|
protected PooledInvokerProxy.ClientSocket |
getPooledConnection()
|
String |
getServerHostName()
The name of of the server. |
static long |
getSocketCloseCount()
|
static long |
getSocketConnectCount()
|
static int |
getTotalPoolCount()
|
Object |
getTransactionPropagationContext()
??? |
static long |
getUsedPooled()
|
protected void |
initPool()
|
Object |
invoke(Invocation invocation)
The invocation on the delegate, calls the right invoker. |
void |
readExternal(ObjectInput in)
|
protected boolean |
returnConnection(PooledInvokerProxy.ClientSocket socket)
Return a socket to the pool |
static void |
setTPCFactory(org.jboss.tm.TransactionPropagationContextFactory tpcf)
|
void |
writeExternal(ObjectOutput out)
Write out the serializable data |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.jboss.tm.TransactionPropagationContextFactory tpcFactory
public static long getSocketTime
public static long readTime
public static long writeTime
public static long serializeTime
public static long deserializeTime
public static long usedPooled
public static int MAX_RETRIES
protected static final Map connectionPools
protected ServerAddress address
protected LinkedList pool
protected int maxPoolSize
protected int retryCount
Constructor Detail |
---|
public PooledInvokerProxy()
public PooledInvokerProxy(ServerAddress sa, int maxPoolSize)
public PooledInvokerProxy(ServerAddress sa, int maxPoolSize, int retryCount)
Method Detail |
---|
public static void setTPCFactory(org.jboss.tm.TransactionPropagationContextFactory tpcf)
public static void clearStats()
public static long getInUseCount()
public static long getUsedPooled()
public static long getSocketConnectCount()
public static long getSocketCloseCount()
public static int getTotalPoolCount()
public long getPoolCount()
public static void clearPool(ServerAddress sa)
public static void clearPools()
protected void initPool()
protected PooledInvokerProxy.ClientSocket getConnection() throws Exception
Exception
protected PooledInvokerProxy.ClientSocket getPooledConnection()
protected boolean returnConnection(PooledInvokerProxy.ClientSocket socket)
socket
-
public String getServerHostName() throws Exception
getServerHostName
in interface Invoker
Exception
public Object getTransactionPropagationContext() throws SystemException
null
if the transaction manager was never
set, or if no transaction is associated with the current thread.
SystemException
public Object invoke(Invocation invocation) throws Exception
invoke
in interface Invoker
invocation
- A pointer to the invocation object
Exception
- Failed to invoke method.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
-
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |