You are here

interface AcquiaPurgeInvalidationInterface in Acquia Purge 7

Describes an invalidation object.

Invalidations are small value objects that describe an individual path from the Acquia Purge queue, to be invalidated for the given scheme and domain name. Executors are responsible for calling ::setStatus(), so that at the end of processing, ::getStatus() evaluates whether the invalidation succeeded across all executor engines. This means that a failed CloudEdge purge, would render the entire path as failed so that it goes back into the queue.

Hierarchy

Expanded class hierarchy of AcquiaPurgeInvalidationInterface

All classes that implement AcquiaPurgeInvalidationInterface

File

lib/invalidation/AcquiaPurgeInvalidationInterface.php, line 13

View source
interface AcquiaPurgeInvalidationInterface extends AcquiaPurgeQueueStatusInterface {

  /**
   * Constructs an invalidation queue item object.
   *
   * @param string $scheme
   *   The requested scheme to be invalidated: 'http' or 'https'.
   * @param string $domain
   *   The domain name to clear the path on, e.g. "foo.com" or "bar.baz".
   * @param string $base_path
   *   Drupal's base path (or the one Acquia Purge is told to clear).
   * @param AcquiaPurgeQueueItemInterface $queue_item
   *   The queue item to which this invalidation is associated.
   */
  public function __construct($scheme, $domain, $base_path, AcquiaPurgeQueueItemInterface $queue_item);

  /**
   * Get the HTTP scheme.
   *
   * @param bool $fqn
   *   Pass TRUE for 'http://' or FALSE for 'http'.
   *
   * @return string
   *   The requested scheme to be invalidated: 'http' or 'https'.
   */
  public function getScheme($fqn = FALSE);

  /**
   * Get the HTTP domain name.
   *
   * @return string
   *   The domain name to clear the path on, e.g. "foo.com" or "bar.baz".
   */
  public function getDomain();

  /**
   * Get the HTTP path.
   *
   * @return string
   *   The path to wipe, e.g. '/basepath/user/1?d=foo' or '/basepath/news/*'.
   */
  public function getPath();

  /**
   * Get the fully qualified URI.
   *
   * @return string
   *   Full URL, e.g. https://domain.com/basepath/user/1?d=foo.
   */
  public function getUri();

  /**
   * Detect if the invalidation has a '*' character in it.
   *
   * @return bool
   *   Returns TRUE when the expression contains a wildcard, FALSE otherwise.
   */
  public function hasWildcard();

  /**
   * Set a string suffix to the ::setStatusContext() context to enable setting
   * multiple statuses within a single executor's ::invalidate() call for a
   * single invalidation object.
   *
   * @param string|null $id
   *   Unique string suffix to be appended to the executors operating context.
   *
   * @see AcquiaPurgeQueueStatusInterface::setStatusContext()
   */
  public function setStatusContextSuffix($suffix);

}

Members

Namesort descending Modifiers Type Description Overrides
AcquiaPurgeInvalidationInterface::getDomain public function Get the HTTP domain name. 1
AcquiaPurgeInvalidationInterface::getPath public function Get the HTTP path. 1
AcquiaPurgeInvalidationInterface::getScheme public function Get the HTTP scheme. 1
AcquiaPurgeInvalidationInterface::getUri public function Get the fully qualified URI. 1
AcquiaPurgeInvalidationInterface::hasWildcard public function Detect if the invalidation has a '*' character in it. 1
AcquiaPurgeInvalidationInterface::setStatusContextSuffix public function Set a string suffix to the ::setStatusContext() context to enable setting multiple statuses within a single executor's ::invalidate() call for a single invalidation object. 1
AcquiaPurgeInvalidationInterface::__construct public function Constructs an invalidation queue item object. 1
AcquiaPurgeQueueStatusInterface::FAILED constant The actor failed processing the item.
AcquiaPurgeQueueStatusInterface::FRESH constant Item is new and no processing has been attempted on it yet.
AcquiaPurgeQueueStatusInterface::getStatus public function Get the current or general status of this object.
AcquiaPurgeQueueStatusInterface::getStatusBoolean public function Get a boolean representation of the general status of this object.
AcquiaPurgeQueueStatusInterface::getStatusString public function Get the current status as string.
AcquiaPurgeQueueStatusInterface::setStatus public function Set the status of the object.
AcquiaPurgeQueueStatusInterface::setStatusContext public function Set (or reset) status context to the executor instance next in line. 1
AcquiaPurgeQueueStatusInterface::setStatusFailed public function Set the status to AcquiaPurgeQueueStatusInterface::FAILED.
AcquiaPurgeQueueStatusInterface::setStatusSucceeded public function Set the status to AcquiaPurgeQueueStatusInterface::SUCCEEDED.
AcquiaPurgeQueueStatusInterface::SUCCEEDED constant The actor succeeded processing the item.