LBFactory_No.php 794 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. **/
  4. require_once( dirname(__FILE__) .'/LoadBalancerNo.php' );
  5. class LBFactory_No extends LBFactory
  6. {
  7. var $mainLB;
  8. var $externalLB;
  9. function __construct( $conf ) {
  10. return null;
  11. }
  12. function newMainLB( $wiki = false ) {
  13. return LoadBalancerNo::getInstance();
  14. }
  15. function getMainLB( $wiki = false ) {
  16. if ( !isset( $this->mainLB ) ) {
  17. $this->mainLB = $this->newMainLB( $wiki );
  18. }
  19. return $this->mainLB;
  20. }
  21. function newExternalLB( $cluster, $wiki = false ) {
  22. return array(
  23. $this->getMainLB( $wiki ),
  24. );
  25. }
  26. function &getExternalLB( $cluster, $wiki = false ) {
  27. if ( !isset( $this->externalLB ) ) {
  28. $this->externalLB = $this->newExternalLB( $cluster, $wiki );
  29. }
  30. return $this->externalLB;
  31. }
  32. function forEachLB( $callback, $params = array() ) {
  33. }
  34. }