Class MultiThreadSyncChannel
- java.lang.Object
-
- org.objectweb.joram.client.jms.connection.MultiThreadSyncChannel
-
- All Implemented Interfaces:
RequestChannel
public class MultiThreadSyncChannel extends Object implements RequestChannel
Class wrapping theRequestChannelin order to group the requests. It allows best performances with multiples senders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMultiThreadSyncChannel.SyncRound
-
Field Summary
Fields Modifier and Type Field Description private RequestChannelchannelThe related RequestChannel.private MultiThreadSyncChannel.SyncRoundcurrentRoundSynchronization round.private intmultiThreadSyncDelayThe maximum time the threads hang if 'multiThreadSync' is true.private intmultiThreadSyncThresholdThe maximum numbers of threads that hang if 'multiThreadSync' is true.private VectorsyncRequestsSynchronized requests.
-
Constructor Summary
Constructors Constructor Description MultiThreadSyncChannel(RequestChannel rc, int delay, int threshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclosing()voidconnect()org.objectweb.joram.shared.security.IdentitygetIdentity()org.objectweb.joram.shared.client.AbstractJmsReplyreceive()voidsend(org.objectweb.joram.shared.client.AbstractJmsRequest request)voidsetTimer(Timer timer)
-
-
-
Field Detail
-
currentRound
private MultiThreadSyncChannel.SyncRound currentRound
Synchronization round.
-
syncRequests
private Vector syncRequests
Synchronized requests.
-
multiThreadSyncDelay
private int multiThreadSyncDelay
The maximum time the threads hang if 'multiThreadSync' is true. Either they wake up (wait time out) or they are notified (by the first woken up thread).
-
multiThreadSyncThreshold
private int multiThreadSyncThreshold
The maximum numbers of threads that hang if 'multiThreadSync' is true.
-
channel
private RequestChannel channel
The related RequestChannel.
-
-
Constructor Detail
-
MultiThreadSyncChannel
MultiThreadSyncChannel(RequestChannel rc, int delay, int threshold)
-
-
Method Detail
-
send
public void send(org.objectweb.joram.shared.client.AbstractJmsRequest request) throws Exception- Specified by:
sendin interfaceRequestChannel- Throws:
Exception
-
setTimer
public void setTimer(Timer timer)
- Specified by:
setTimerin interfaceRequestChannel
-
connect
public void connect() throws Exception- Specified by:
connectin interfaceRequestChannel- Throws:
Exception
-
receive
public org.objectweb.joram.shared.client.AbstractJmsReply receive() throws Exception- Specified by:
receivein interfaceRequestChannel- Throws:
Exception
-
close
public void close()
- Specified by:
closein interfaceRequestChannel
-
closing
public void closing()
- Specified by:
closingin interfaceRequestChannel
-
getIdentity
public org.objectweb.joram.shared.security.Identity getIdentity()
- Specified by:
getIdentityin interfaceRequestChannel
-
-