Class ScheduledTask

java.lang.Object
net.ognetwork.ogcore.api.scheduledtasks.ScheduledTask
Direct Known Subclasses:
PartyDisconnectTask, PartyInviteTask

public abstract class ScheduledTask extends Object
  • Field Details

  • Constructor Details

    • ScheduledTask

      public ScheduledTask(String redisKey, long executionTime, String payload)
      Schedules a task with the specified execution time and payload.
      Parameters:
      redisKey - The redis key to use for the scheduled task.
      executionTime - The unix timestamp that the task should be executed at.
      payload - The payload that will be used to execute the task at the specified time.
    • ScheduledTask

      public ScheduledTask(long executionTime, String payload)
      Schedules a task with the specified execution time and payload.
      Parameters:
      executionTime - The unix timestamp that the task should be executed at.
      payload - The payload that will be used to execute the task at the specified time.
    • ScheduledTask

      public ScheduledTask(String redisKey)
      Creates a scheduled task instance based on a known key. If the key does not exist, then a scheduled task is created with this key.
      Parameters:
      redisKey - The redis key corresponding to this scheduled task.
  • Method Details

    • smartExecute

      public static void smartExecute(String fullRedisKey)
    • cancel

      public void cancel()