org.almendra.janet.cas.schedulers
Class ApplicationScheduler

java.lang.Object
  extended by org.almendra.commons.threads.ActiveObject
      extended by org.almendra.commons.threads.ActiveSchedulingObject
          extended by org.almendra.janet.cas.schedulers.AbstractScheduler
              extended by org.almendra.janet.cas.schedulers.CommandScheduler
                  extended by org.almendra.janet.cas.schedulers.PriorityCommandScheduler
                      extended by org.almendra.janet.cas.schedulers.ArbitratedScheduler
                          extended by org.almendra.janet.cas.schedulers.ApplicationScheduler
All Implemented Interfaces:
java.lang.Runnable, INamedObject, IExecutable, ISimpleActiveObject, ILoggable

public class ApplicationScheduler
extends ArbitratedScheduler
implements IExecutable

Author:
Oliver Plohmann

Field Summary
static java.lang.String LOGGER_OBJECT_NAME
           
 
Fields inherited from class org.almendra.janet.cas.schedulers.ArbitratedScheduler
application, arbitrator, capability, Count, DEFAULT_PRIORITIES, state, STATE_NEW, STATE_SCHEDULED, STATE_SLEEPING, STATE_WAITING
 
Fields inherited from class org.almendra.janet.cas.schedulers.CommandScheduler
LOG_EVENT_NO_SUITABLE_INTERPRETER_FOUND, LOG_EVENT_POST_EXEC_CMD, LOG_EVENT_PRE_EXEC_CMD, node
 
Fields inherited from class org.almendra.janet.cas.schedulers.AbstractScheduler
LOG_EVENT_RESUMING_SCHEDULER, LOG_EVENT_STARTED_SCHEDULER, LOG_EVENT_STOPPED_SCHEDULER, LOG_EVENT_SUSPENDING_SCHEDULER, logger
 
Fields inherited from class org.almendra.commons.threads.ActiveSchedulingObject
available, executing, queue
 
Fields inherited from class org.almendra.commons.threads.ActiveObject
activeLock, isActive, name, priority, thread, verbose, waiting
 
Constructor Summary
protected ApplicationScheduler()
           
  ApplicationScheduler(Arbitrator arbitrator, AbstractApplication application, Capability capability, Logger logger, boolean verbose, int numPriorities)
           
 
Method Summary
protected  java.lang.String getLoggerObjectName()
           
 int getMaxPriority()
           
 int getNumberOfSchedulersInSameApplication()
           
 
Methods inherited from class org.almendra.janet.cas.schedulers.ArbitratedScheduler
commandAdded, executableAdded, finishedExecution, getApplicationName, getCapabilityName, getCurrentAgentName, getLogName, isRunning, isSleeping, isWaiting, justCreated, setLogger, setNew, setScheduled, setSleeping, setWaiting
 
Methods inherited from class org.almendra.janet.cas.schedulers.PriorityCommandScheduler
getApplication, getDefaultNumberOfPriorities, getInterpreter, init
 
Methods inherited from class org.almendra.janet.cas.schedulers.CommandScheduler
accept, executableRemoved, execute, execute, execute, isDaemon, logExecuting, logInterpreterNotFound, messageResuming, messageSuspending, monitorFinishedCommand, monitorRemovedWaitingCommand, monitorStartedCommand, registeredLogEvents
 
Methods inherited from class org.almendra.janet.cas.schedulers.AbstractScheduler
getDefaultLogEntry, getLogger, log, messageStarting, messageStopping
 
Methods inherited from class org.almendra.commons.threads.ActiveSchedulingObject
add, available, doActivity, executePrimary, finishedExecution, getNext, getNextPrim, getQueueSize, hasNext, isIdle, remove, resuming, startingExecution, suspending
 
Methods inherited from class org.almendra.commons.threads.ActiveObject
getName, getPriority, isActive, isVerbose, run, setActive, setName, setPriority, setVerbose, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.almendra.commons.threads.IExecutable
execute
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface org.almendra.commons.threads.ISimpleActiveObject
isActive, start, stop
 
Methods inherited from interface org.almendra.commons.INamedObject
getName
 

Field Detail

LOGGER_OBJECT_NAME

public static final java.lang.String LOGGER_OBJECT_NAME
See Also:
Constant Field Values
Constructor Detail

ApplicationScheduler

protected ApplicationScheduler()

ApplicationScheduler

public ApplicationScheduler(Arbitrator arbitrator,
                            AbstractApplication application,
                            Capability capability,
                            Logger logger,
                            boolean verbose,
                            int numPriorities)
Parameters:
node -
arbitrator -
verbose -
numPriorities -
Method Detail

getNumberOfSchedulersInSameApplication

public int getNumberOfSchedulersInSameApplication()
Specified by:
getNumberOfSchedulersInSameApplication in class ArbitratedScheduler
Returns:

getLoggerObjectName

protected java.lang.String getLoggerObjectName()
Specified by:
getLoggerObjectName in class ArbitratedScheduler

getMaxPriority

public int getMaxPriority()
Specified by:
getMaxPriority in class ArbitratedScheduler