Class AbstractSystemTask

java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.logger.SystemLogger
com.tenio.core.schedule.task.AbstractSystemTask
All Implemented Interfaces:
com.tenio.common.task.Task
Direct Known Subclasses:
AutoCleanOrphanSessionTask, AutoDisconnectPlayerTask, AutoRemoveRoomTask, CcuReportTask, DeadlockScanTask, KcpUpdateTask, SystemMonitoringTask, TrafficCounterTask

public abstract class AbstractSystemTask extends com.tenio.common.logger.SystemLogger implements com.tenio.common.task.Task
The abstract task for system related schedule.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected EventManager
    The event manager.
    protected int
    The initial delay time.
    protected int
    The interval value.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Initialization.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setInterval(int interval)
    Set the interval.

    Methods inherited from class com.tenio.common.logger.SystemLogger

    debug, debugEvent, isDebugEnabled, isTraceEnabled, trace, trace

    Methods inherited from class com.tenio.common.logger.AbstractLogger

    buildgen, error, error, error, info, info, info, info, info, info, info, info, isErrorEnabled, isInfoEnabled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.tenio.common.task.Task

    run
  • Field Details

    • eventManager

      protected EventManager eventManager
      The event manager.
    • interval

      protected int interval
      The interval value.
    • initialDelay

      protected int initialDelay
      The initial delay time. The task should wait a little until the system becomes stable.
  • Constructor Details

    • AbstractSystemTask

      protected AbstractSystemTask(EventManager eventManager)
      Initialization.
      Parameters:
      eventManager - the event manager
  • Method Details

    • setInterval

      public void setInterval(int interval)
      Set the interval.
      Parameters:
      interval - the value