Class CronTask<T>

    • Field Detail

      • m_origTask

        protected Task<T> m_origTask
        The original Task.
      • m_task

        protected Task<T> m_task
        The actual Task.
      • m_sCronPattern

        protected String m_sCronPattern
        The crontab scheduling pattern for the Task.
      • m_ldtNextExecutionMillis

        protected long m_ldtNextExecutionMillis
        The next execution time.
    • Constructor Detail

      • CronTask

        public CronTask()
        Constructs a CronTask (required for serialization).
      • CronTask

        public CronTask​(Task<T> task,
                        String sPattern)
        Constructs a CronTask.
        Parameters:
        task - the task
        sPattern - the crontab scheduling pattern
    • Method Detail

      • getCronPattern

        public String getCronPattern()
        Returns the crontab schedule pattern.
        Returns:
        the crontab schedule pattern
      • getNextExecutionMillis

        public long getNextExecutionMillis​(long cMillis)
        Returns the next execution time in milliseconds.
        Parameters:
        cMillis - The timestamp, as a UNIX-era millis value.
        Returns:
        the next execution time in milliseconds
      • readExternal

        public void readExternal​(DataInput in)
                          throws IOException
        Specified by:
        readExternal in interface com.tangosol.io.ExternalizableLite
        Throws:
        IOException
      • writeExternal

        public void writeExternal​(DataOutput out)
                           throws IOException
        Specified by:
        writeExternal in interface com.tangosol.io.ExternalizableLite
        Throws:
        IOException
      • readExternal

        public void readExternal​(com.tangosol.io.pof.PofReader in)
                          throws IOException
        Specified by:
        readExternal in interface com.tangosol.io.pof.PortableObject
        Throws:
        IOException
      • writeExternal

        public void writeExternal​(com.tangosol.io.pof.PofWriter out)
                           throws IOException
        Specified by:
        writeExternal in interface com.tangosol.io.pof.PortableObject
        Throws:
        IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • clone

        public static Object clone​(Object object)
        Creates a clone of the given object.
        Parameters:
        object - the object to clone
        Returns:
        the cloned object
      • of

        public static <T> CronTask<T> of​(Task<T> task,
                                         String sCronPattern)
        Obtains a CronTask.
        Type Parameters:
        T - the type of the Task
        Parameters:
        task - the task to be scheduled
        sCronPattern - the task schedule pattern
        Returns:
        a CronTask