Package org.jgroups.protocols
Class CENTRAL_EXECUTOR
- java.lang.Object
-
- org.jgroups.stack.Protocol
-
- org.jgroups.protocols.Executing
-
- org.jgroups.protocols.CENTRAL_EXECUTOR
-
public class CENTRAL_EXECUTOR extends Executing
This is a central executor service where each request is sent to the coordinator for either a task or a current waiting thread.- Since:
- 2.12.0
- Author:
- wburns
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.protocols.Executing
Executing.ExecutorHeader, Executing.Owner, Executing.Request, Executing.RequestWithThread, Executing.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Address>
backups
protected Address
coord
protected boolean
is_coord
protected int
num_backups
-
Fields inherited from class org.jgroups.protocols.Executing
_awaitingConsumer, _awaitingReturn, _consumerId, _consumerLock, _consumersAvailable, _requestId, _runnableThreads, _running, _runRequests, _taskBarriers, _tasks, bypass_bundling, counter, local_addr, notifiers, PRESENT, view
-
Fields inherited from class org.jgroups.stack.Protocol
after_creation_hook, down_prot, ergonomics, id, log, stack, stats, up_prot
-
-
Constructor Summary
Constructors Constructor Description CENTRAL_EXECUTOR()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyQueueTo(java.util.List<Address> new_joiners)
java.lang.String
getBackups()
Address
getCoord()
java.lang.String
getCoordinator()
int
getNumberOfBackups()
void
handleView(View view)
boolean
isCoord()
protected void
sendNewConsumerRequest(Executing.Owner sender)
protected void
sendNewRunRequest(Executing.Owner sender)
protected void
sendRemoveConsumerRequest(Executing.Owner sender)
protected void
sendRemoveRunRequest(Executing.Owner sender)
protected void
sendToCoordinator(Executing.Type type, long requestId, Address value)
void
setNumberOfBackups(int num_backups)
protected void
updateBackups(Executing.Type type, Executing.Owner obj)
-
Methods inherited from class org.jgroups.protocols.Executing
addExecutorListener, down, getAddress, getBypassBundling, getView, handleConsumerFoundResponse, handleConsumerReadyRequest, handleConsumerUnreadyRequest, handleExceptionResponse, handleInterruptRequest, handleNewConsumer, handleNewRunRequest, handleRemoveConsumer, handleRemoveRunRequest, handleTaskRejectedResponse, handleTaskRequest, handleTaskSubmittedRequest, handleValueResponse, removeKeyForValue, sendRequest, sendThreadRequest, setBypassBundling, up, up
-
Methods inherited from class org.jgroups.stack.Protocol
accept, afterCreationHook, destroy, down, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, init, isErgonomics, level, parse, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, start, statsEnabled, stop, up
-
-
-
-
Method Detail
-
getCoord
public Address getCoord()
-
isCoord
public boolean isCoord()
-
getCoordinator
public java.lang.String getCoordinator()
-
getNumberOfBackups
public int getNumberOfBackups()
-
setNumberOfBackups
public void setNumberOfBackups(int num_backups)
-
getBackups
public java.lang.String getBackups()
-
handleView
public void handleView(View view)
- Overrides:
handleView
in classExecuting
-
updateBackups
protected void updateBackups(Executing.Type type, Executing.Owner obj)
-
copyQueueTo
protected void copyQueueTo(java.util.List<Address> new_joiners)
-
sendToCoordinator
protected void sendToCoordinator(Executing.Type type, long requestId, Address value)
- Specified by:
sendToCoordinator
in classExecuting
-
sendNewRunRequest
protected void sendNewRunRequest(Executing.Owner sender)
- Specified by:
sendNewRunRequest
in classExecuting
-
sendRemoveRunRequest
protected void sendRemoveRunRequest(Executing.Owner sender)
- Specified by:
sendRemoveRunRequest
in classExecuting
-
sendNewConsumerRequest
protected void sendNewConsumerRequest(Executing.Owner sender)
- Specified by:
sendNewConsumerRequest
in classExecuting
-
sendRemoveConsumerRequest
protected void sendRemoveConsumerRequest(Executing.Owner sender)
- Specified by:
sendRemoveConsumerRequest
in classExecuting
-
-