Esri Geoportal Server
1.0

com.esri.gpt.framework.scheduler
Class ThreadSchedulerConfiguration

java.lang.Object
  extended by com.esri.gpt.framework.scheduler.ThreadSchedulerConfiguration
All Implemented Interfaces:
Serializable

public class ThreadSchedulerConfiguration
extends Object
implements Serializable

Collection of thread definitions.

See Also:
Serialized Form

Constructor Summary
ThreadSchedulerConfiguration()
           
 
Method Summary
 void addDefinition(String className, String delay, String period, String at, StringAttributeMap parameters)
          Adds a thread definition.
 boolean getActive()
          Gets active flag value.
 int getCorePoolSize()
          Gets core pool size.
 ScheduledExecutorService getService()
          Creates service.
 List<ThreadDefinition> getThreadsDefinitions()
          Gets threads definitions.
 void setActive(boolean active)
          Sets active flag value.
 void setCorePoolSize(int corePoolSize)
          Sets core pool size.
 void setThreadsDefinitions(List<ThreadDefinition> threadsDefinitions)
          Sets threads definitions.
 String toString()
          Creates string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadSchedulerConfiguration

public ThreadSchedulerConfiguration()
Method Detail

getActive

public boolean getActive()
Gets active flag value.

Returns:
active flag value

setActive

public void setActive(boolean active)
Sets active flag value.

Parameters:
active - active flag value

getCorePoolSize

public int getCorePoolSize()
Gets core pool size.

Returns:
core pool size

setCorePoolSize

public void setCorePoolSize(int corePoolSize)
Sets core pool size.

Parameters:
corePoolSize - core pool size

getThreadsDefinitions

public List<ThreadDefinition> getThreadsDefinitions()
Gets threads definitions.

Returns:
threads definitions

setThreadsDefinitions

public void setThreadsDefinitions(List<ThreadDefinition> threadsDefinitions)
Sets threads definitions.

Parameters:
threadsDefinitions - threads definitions

addDefinition

public void addDefinition(String className,
                          String delay,
                          String period,
                          String at,
                          StringAttributeMap parameters)
Adds a thread definition.

Parameters:
className - the class to be scheduled
delay - to execution since registering thread in units
period - frequency of execution in units
at - time of execution in the format "HH:MM"
parameters - map of additional optional parameters

getService

public ScheduledExecutorService getService()
Creates service.

Returns:
service or null if service creation not allowed

toString

public String toString()
Creates string representation of the object.

Overrides:
toString in class Object
Returns:
string representation of the object

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.