org.jgroups.protocols
Class CENTRAL_EXECUTOR

java.lang.Object
  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.protocols.Executing
          extended by 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
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
down_prot, ergonomics, id, log, name, stack, stats, up_prot
 
Constructor Summary
CENTRAL_EXECUTOR()
           
 
Method Summary
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
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, init, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

num_backups

protected int num_backups

coord

protected Address coord

is_coord

protected boolean is_coord

backups

protected final java.util.List<Address> backups
Constructor Detail

CENTRAL_EXECUTOR

public CENTRAL_EXECUTOR()
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 class Executing

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 class Executing

sendNewRunRequest

protected void sendNewRunRequest(Executing.Owner sender)
Specified by:
sendNewRunRequest in class Executing

sendRemoveRunRequest

protected void sendRemoveRunRequest(Executing.Owner sender)
Specified by:
sendRemoveRunRequest in class Executing

sendNewConsumerRequest

protected void sendNewConsumerRequest(Executing.Owner sender)
Specified by:
sendNewConsumerRequest in class Executing

sendRemoveConsumerRequest

protected void sendRemoveConsumerRequest(Executing.Owner sender)
Specified by:
sendRemoveConsumerRequest in class Executing


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.