示例#1
0
 /**
  * This method will be invoked, after the while() loop has been finished and
  * can be used to implement clean up functionality.
  *
  * @return void
  */
 public function cleanUp()
 {
     // create a separate queue for each priority
     foreach (PriorityKeys::getAll() as $priorityKey) {
         $this->workers[$this->uniqueWorkerName($priorityKey)]->stop();
     }
 }
 /**
  * Returns the priority of the message.
  *
  * @return \AppserverIo\Psr\Pms\PriorityKeyInterface The priority of the message
  */
 public function getPriority()
 {
     return PriorityKeys::get($this->priority);
 }