GearmanAnnotations.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace Mmoreramerino\GearmanBundle\Driver\Gearman;
  3. use Doctrine\Common\Annotations\Annotation;
  4. /**
  5. * Gearman annotations driver
  6. *
  7. * @author Marc Morera <marc@ulabox.com>
  8. */
  9. /**
  10. * @Annotation
  11. */
  12. final class Work extends Annotation {
  13. /**
  14. * Number of iterations specified for all jobs inside Work
  15. *
  16. * @var integer
  17. */
  18. public $name = NULL;
  19. /**
  20. * Description of Worker
  21. *
  22. * @var string
  23. */
  24. public $description = NULL;
  25. /**
  26. * Number of iterations specified for all jobs inside Work
  27. *
  28. * @var integer
  29. */
  30. public $iter = NULL;
  31. /**
  32. * Servers assigned for all jobs of this work to be executed
  33. *
  34. * @var mixed
  35. */
  36. public $servers = null;
  37. }
  38. /**
  39. * @Annotation
  40. */
  41. final class Job extends Annotation {
  42. /**
  43. * Method name to assign into job
  44. *
  45. * @var string
  46. */
  47. public $name = NULL;
  48. /**
  49. * Description of Job
  50. *
  51. * @var string
  52. */
  53. public $description = NULL;
  54. /**
  55. * Number of iterations specified for this job
  56. *
  57. * @var integer
  58. */
  59. public $iter = NULL;
  60. /**
  61. * Servers assigned for this job to be executed
  62. *
  63. * @var mixed
  64. */
  65. public $servers = null;
  66. }