Class PrimaryOwnerScheduler<I,M>

java.lang.Object
org.wildfly.clustering.server.infinispan.scheduler.PrimaryOwnerScheduler<I,M>
Type Parameters:
I - the scheduled entry identifier type
M - the scheduled entry metadata type
All Implemented Interfaces:
AutoCloseable, Scheduler<I,M>, Scheduler<I,M>

public class PrimaryOwnerScheduler<I,M> extends Object implements Scheduler<I,M>
Scheduler decorator that schedules/cancels a given object on the primary owner.
Author:
Paul Ferraro
  • Constructor Details

  • Method Details

    • schedule

      public void schedule(I id)
      Description copied from interface: Scheduler
      Schedules an entry for the specified identifier.
      Specified by:
      schedule in interface Scheduler<I,M>
      Parameters:
      id - a scheduled entry identifier
    • schedule

      public void schedule(I id, M metaData)
      Description copied from interface: Scheduler
      Schedules a task for the object with the specified identifier, using the specified metaData
      Specified by:
      schedule in interface Scheduler<I,M>
      Parameters:
      id - the scheduled entry identifier
      metaData - the scheduled entry value
    • cancel

      public void cancel(I id)
      Description copied from interface: Scheduler
      Cancels a previously scheduled task for the object with the specified identifier.
      Specified by:
      cancel in interface Scheduler<I,M>
      Parameters:
      id - an object identifier
    • contains

      public boolean contains(I id)
      Description copied from interface: Scheduler
      Indicates whether the entry with the specified identifier is scheduled.
      Specified by:
      contains in interface Scheduler<I,M>
      Parameters:
      id - an object identifier
      Returns:
      true, if the specified entry is scheduled, false otherwise.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Scheduler<I,M>