public static function registry(ObjectRegistry $registry = null)
    {
        if ($registry) {
            static::$_registry = $registry;
        }

        if (empty(static::$_registry)) {
            static::$_registry = new QueueEngineRegistry();
        }

        return static::$_registry;
    }
public static function registry(ObjectRegistry $registry = null)
    {
        if ($registry) {
            static::$_registry = $registry;
        }

        if (empty(static::$_registry)) {
            static::$_registry = new QueueEngineRegistry();
        }

        return static::$_registry;
    }
public static function registry ( ObjectRegistry $ registry = null ) { if ( $ registry ) { static :: $ _registry = $ registry ; } if ( empty ( static :: $ _registry ) ) { static :: $ _registry = new QueueEngineRegistry ( ) ; } return static :: $ _registry ; }
Returns the Queue Registry instance used for creating and using queue engines.
Also allows for injecting of a new registry instance.

@param \Cake\Core\ObjectRegistry|null $registry Injectable registry object.
@return \Cake\Core\ObjectRegistry
Returns the Queue Registry instance used for creating and using queue engines . Also allows for injecting of a new registry instance .