ArcGIS Server Geoportal extension
10

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.
 int getHarvestThreadsNumber()
          Deprecated. since 10.0; use HarvesterConfiguration.getPoolSize() instead
 TimePeriod getJobInactivityPeriod()
          Deprecated. since 10.0 with no intent to replace
 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 setHarvestThreadsNumber(int harvestThreadsNumber)
          Deprecated. since 10.0; use HarvesterConfiguration.setPoolSize(int) instead
 void setJobInactivityPeriod(TimePeriod jobInactivityPeriod)
          Deprecated. since 10.0 with no intent to replace
 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

getHarvestThreadsNumber

@Deprecated
public int getHarvestThreadsNumber()
Deprecated. since 10.0; use HarvesterConfiguration.getPoolSize() instead

Gets number of threads to be launched by Harvesting Service.

Returns:
number of threads

setHarvestThreadsNumber

@Deprecated
public void setHarvestThreadsNumber(int harvestThreadsNumber)
Deprecated. since 10.0; use HarvesterConfiguration.setPoolSize(int) instead

Sets number of threads to be launched by Harvesting Service.

Parameters:
harvestThreadsNumber - number of threads

getJobInactivityPeriod

@Deprecated
public TimePeriod getJobInactivityPeriod()
Deprecated. since 10.0 with no intent to replace

Gets job inactivity period.

Returns:
job inactivity period

setJobInactivityPeriod

@Deprecated
public void setJobInactivityPeriod(TimePeriod jobInactivityPeriod)
Deprecated. since 10.0 with no intent to replace

Sets job inactivity period

Parameters:
jobInactivityPeriod - job inactivity period

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

ArcGIS Server Geoportal extension
10

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