QueueJobInterface.php 596 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Module\LCache;
  3. interface QueueJobInterface
  4. {
  5. /**
  6. * 获取数据
  7. *
  8. * @param $parameter
  9. * @return mixed
  10. */
  11. static public function getNewData(array $parameter = []);
  12. /**
  13. * 缓存时间
  14. *
  15. * @return int
  16. */
  17. static public function getTtl(): int;
  18. /**
  19. * 缓存时间,防止重复执行
  20. *
  21. * @return int
  22. */
  23. static public function getPreventDuplication(): int;
  24. /**
  25. * 获取必填参数索引
  26. * @return array
  27. */
  28. static public function getRequiredArgIndex(): array;
  29. }