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.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, _consumerLock, _consumersAvailable, _runnableThreads, _running, _runRequests, _tasks, bypass_bundling, counter, local_addr, notifiers, 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(Address sender)
           
protected  void sendNewRunRequest(Address sender)
           
protected  void sendRemoveConsumerRequest(Address sender)
           
protected  void sendRemoveRunRequest(Address sender)
           
protected  void sendToCoordinator(Executing.Type type, java.lang.Object value)
           
 void setNumberOfBackups(int num_backups)
           
protected  void updateBackups(Executing.Type type, java.lang.Object obj)
           
 
Methods inherited from class org.jgroups.protocols.Executing
addExecutorListener, down, getAddress, getBypassBundling, getView, handleConsumerFoundResponse, handleConsumerReadyRequest, handleExceptionResponse, handleInterruptRequest, handleNewConsumer, handleNewRunRequest, handleRemoveConsumer, handleRemoveRunRequest, handleTaskRejectedResponse, handleTaskRequest, handleTaskSubmittedRequest, handleValueResponse, sendRequest, setBypassBundling, up
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, downThreadEnabled, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProperties, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, init, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop, upThreadEnabled
 
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,
                             java.lang.Object obj)

copyQueueTo

protected void copyQueueTo(java.util.List<Address> new_joiners)

sendToCoordinator

protected void sendToCoordinator(Executing.Type type,
                                 java.lang.Object value)
Specified by:
sendToCoordinator in class Executing

sendNewRunRequest

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

sendRemoveRunRequest

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

sendNewConsumerRequest

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

sendRemoveConsumerRequest

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


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