Class AbstractGearmanFunction

    • Constructor Detail

      • AbstractGearmanFunction

        public AbstractGearmanFunction()
      • AbstractGearmanFunction

        public AbstractGearmanFunction​(String name)
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: GearmanFunction
        Retrieves the name of the funcion to be executed by the job. This is used by a GearmanWorker to determine if the function has been regisitered with the worker and therefor can be executed by the Worker.
        Specified by:
        getName in interface GearmanFunction
        Returns:
        the name of the function.
      • setData

        public void setData​(Object data)
        Description copied from interface: GearmanFunction
        Some functions require a dataset upon which to operate. This method is used to load that data so that it is available when the function is called.
        Specified by:
        setData in interface GearmanFunction
        Parameters:
        data - The data used by the function at execution time.
      • getJobHandle

        public byte[] getJobHandle()
        Description copied from interface: GearmanFunction
        Retrieves the handle for the job that is executing this function.
        Specified by:
        getJobHandle in interface GearmanFunction
        Returns:
        The jobhandle or an empty array if the handle is not set.
      • sendData

        public void sendData​(byte[] data)
      • sendWarning

        public void sendWarning​(byte[] warning)
      • sendException

        public void sendException​(byte[] exception)
      • sendStatus

        public void sendStatus​(int denominator,
                               int numerator)
      • setUniqueId

        public void setUniqueId​(byte[] uuid)
        Description copied from interface: GearmanFunction
        Set the Unique ID given to this job by the client
        Specified by:
        setUniqueId in interface GearmanFunction
      • getUniqueId

        public byte[] getUniqueId()
        Description copied from interface: GearmanFunction
        Returns the Unique ID given to this job by the client
        Specified by:
        getUniqueId in interface GearmanFunction