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>backupsprotected Addresscoordprotected booleanis_coordprotected intnum_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 voidcopyQueueTo(java.util.List<Address> new_joiners)java.lang.StringgetBackups()AddressgetCoord()java.lang.StringgetCoordinator()intgetNumberOfBackups()voidhandleView(View view)booleanisCoord()protected voidsendNewConsumerRequest(Executing.Owner sender)protected voidsendNewRunRequest(Executing.Owner sender)protected voidsendRemoveConsumerRequest(Executing.Owner sender)protected voidsendRemoveRunRequest(Executing.Owner sender)protected voidsendToCoordinator(Executing.Type type, long requestId, Address value)voidsetNumberOfBackups(int num_backups)protected voidupdateBackups(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:
handleViewin 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:
sendToCoordinatorin classExecuting
-
sendNewRunRequest
protected void sendNewRunRequest(Executing.Owner sender)
- Specified by:
sendNewRunRequestin classExecuting
-
sendRemoveRunRequest
protected void sendRemoveRunRequest(Executing.Owner sender)
- Specified by:
sendRemoveRunRequestin classExecuting
-
sendNewConsumerRequest
protected void sendNewConsumerRequest(Executing.Owner sender)
- Specified by:
sendNewConsumerRequestin classExecuting
-
sendRemoveConsumerRequest
protected void sendRemoveConsumerRequest(Executing.Owner sender)
- Specified by:
sendRemoveConsumerRequestin classExecuting
-
-