diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php
index f9d1034705..1ee90f4bbd 100644
--- a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php
+++ b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php
@@ -8,25 +8,17 @@
 use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
- * Stores and retrieves temporary data for a given owner.
+ * Stores and retrieves private temporary data for a given owner.
  *
- * A PrivateTempStore can be used to make temporary, non-cache data available
- * across requests. The data for the PrivateTempStore is stored in one
- * key/value collection. PrivateTempStore data expires automatically after a
- * given timeframe.
+ * The data for the PrivateTempStore is stored in one key/value collection.
+ * PrivateTempStore data expires automatically after a given timeframe.
  *
- * The PrivateTempStore is different from a cache, because the data in it is not
- * yet saved permanently and so it cannot be rebuilt. Typically, the
- * PrivateTempStore might be used to store work in progress that is later saved
- * permanently elsewhere, e.g. autosave data, multistep forms, or in-progress
- * changes to complex configuration that are not ready to be saved.
+ * If you want to be able to share data between users or use it for locking, use
+ * SharedTempStore.
  *
- * The PrivateTempStore differs from the SharedTempStore in that all keys are
- * ensured to be unique for a particular user and users can never share data. If
- * you want to be able to share data between users or use it for locking, use
- * \Drupal\Core\TempStore\SharedTempStore.
+ * @see \Drupal\Core\TempStore\SharedTempStore
  */
-class PrivateTempStore {
+class PrivateTempStore implements PrivateTempStoreInterface {
 
   /**
    * The key/value storage object used for this data.
@@ -90,13 +82,7 @@ public function __construct(KeyValueStoreExpirableInterface $storage, LockBacken
   }
 
   /**
-   * Retrieves a value from this PrivateTempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
+   * {@inheritdoc}
    */
   public function get($key) {
     $key = $this->createkey($key);
@@ -106,15 +92,7 @@ public function get($key) {
   }
 
   /**
-   * Stores a particular key/value pair in this PrivateTempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @throws \Drupal\Core\TempStore\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
+   * {@inheritdoc}
    */
   public function set($key, $value) {
     $key = $this->createkey($key);
@@ -135,14 +113,7 @@ public function set($key, $value) {
   }
 
   /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
+   * {@inheritdoc}
    */
   public function getMetadata($key) {
     $key = $this->createkey($key);
@@ -156,17 +127,7 @@ public function getMetadata($key) {
   }
 
   /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
-   *
-   * @throws \Drupal\Core\TempStore\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
+   * {@inheritdoc}
    */
   public function delete($key) {
     $key = $this->createkey($key);
diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php
index b80b825b49..d45042e711 100644
--- a/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php
+++ b/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php
@@ -76,7 +76,7 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory,
    *   The collection name to use for this key/value store. This is typically
    *   a shared namespace or module name, e.g. 'views', 'entity', etc.
    *
-   * @return \Drupal\Core\TempStore\PrivateTempStore
+   * @return \Drupal\Core\TempStore\PrivateTempStoreInterface
    *   An instance of the key/value store.
    */
   public function get($collection) {
diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStoreInterface.php b/core/lib/Drupal/Core/TempStore/PrivateTempStoreInterface.php
new file mode 100644
index 0000000000..b977c90818
--- /dev/null
+++ b/core/lib/Drupal/Core/TempStore/PrivateTempStoreInterface.php
@@ -0,0 +1,67 @@
+<?php
+
+namespace Drupal\Core\TempStore;
+
+/**
+ * An interface for private temporary data stores.
+ *
+ * A private temporary data store can be used to make temporary, non-cache data
+ * available across requests.
+ *
+ * A private temporary data store is different from a cache, because the data in
+ * it is not yet saved permanently and so it cannot be rebuilt. Typically, a
+ * private temporary data store might be used to store work in progress that is
+ * later saved permanently elsewhere, e.g. autosave data, multistep forms, or
+ * in-progress changes to complex configuration that are not ready to be saved.
+ *
+ * A private temporary data store differs from a shared temporary data store in
+ * that all keys are ensured to be unique for a particular owner and owners can
+ * never share data. If you want to be able to share data between users or use
+ * it for locking, use SharedTempStoreInterface.
+ *
+ * @see \Drupal\Core\TempStore\SharedTempStoreInterface
+ */
+interface PrivateTempStoreInterface {
+
+  /**
+   * Retrieves a value from the store for a given key.
+   *
+   * @param string $key
+   *   The key of the data to retrieve.
+   *
+   * @return mixed
+   *   The data associated with the key, or NULL if the key does not exist.
+   */
+  public function get($key);
+
+  /**
+   * Stores a particular key/value pair in the store.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   * @param mixed $value
+   *   The data to store.
+   */
+  public function set($key, $value);
+
+  /**
+   * Returns the metadata associated with a particular key/value pair.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   *
+   * @return mixed
+   *   An object with the owner and updated time if the key has a value, or
+   *   NULL otherwise.
+   */
+  public function getMetadata($key);
+
+  /**
+   * Deletes data from the store for a given key and releases the lock on it.
+   *
+   * @param string $key
+   *   The key of the data to delete.
+   */
+  public function delete($key);
+
+}
diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStore.php b/core/lib/Drupal/Core/TempStore/SharedTempStore.php
index c131a80fd2..178a586767 100644
--- a/core/lib/Drupal/Core/TempStore/SharedTempStore.php
+++ b/core/lib/Drupal/Core/TempStore/SharedTempStore.php
@@ -9,33 +9,15 @@
 /**
  * Stores and retrieves temporary data for a given owner.
  *
- * A SharedTempStore can be used to make temporary, non-cache data available
- * across requests. The data for the SharedTempStore is stored in one key/value
- * collection. SharedTempStore data expires automatically after a given
- * timeframe.
- *
- * The SharedTempStore is different from a cache, because the data in it is not
- * yet saved permanently and so it cannot be rebuilt. Typically, the
- * SharedTempStore might be used to store work in progress that is later saved
- * permanently elsewhere, e.g. autosave data, multistep forms, or in-progress
- * changes to complex configuration that are not ready to be saved.
- *
- * Each SharedTempStore belongs to a particular owner (e.g. a user, session, or
- * process). Multiple owners may use the same key/value collection, and the
- * owner is stored along with the key/value pair.
- *
- * Every key is unique within the collection, so the SharedTempStore can check
- * whether a particular key is already set by a different owner. This is
- * useful for informing one owner that the data is already in use by another;
- * for example, to let one user know that another user is in the process of
- * editing certain data, or even to restrict other users from editing it at
- * the same time. It is the responsibility of the implementation to decide
- * when and whether one owner can use or update another owner's data.
+ * The data for the SharedTempStore is stored in one key/value collection.
+ * SharedTempStore data expires automatically after a given timeframe.
  *
  * If you want to be able to ensure that the data belongs to the current user,
- * use \Drupal\Core\TempStore\PrivateTempStore.
+ * use PrivateTempStore.
+ *
+ * @see \Drupal\Core\TempStore\PrivateTempStore
  */
-class SharedTempStore {
+class SharedTempStore implements SharedTempStoreInterface {
 
   /**
    * The key/value storage object used for this data.
@@ -99,13 +81,7 @@ public function __construct(KeyValueStoreExpirableInterface $storage, LockBacken
   }
 
   /**
-   * Retrieves a value from this SharedTempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
+   * {@inheritdoc}
    */
   public function get($key) {
     if ($object = $this->storage->get($key)) {
@@ -114,15 +90,7 @@ public function get($key) {
   }
 
   /**
-   * Retrieves a value from this SharedTempStore for a given key.
-   *
-   * Only returns the value if the value is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
+   * {@inheritdoc}
    */
   public function getIfOwner($key) {
     if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
@@ -131,15 +99,7 @@ public function getIfOwner($key) {
   }
 
   /**
-   * Stores a particular key/value pair only if the key doesn't already exist.
-   *
-   * @param string $key
-   *   The key of the data to check and store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already existed.
+   * {@inheritdoc}
    */
   public function setIfNotExists($key, $value) {
     $value = (object) [
@@ -151,22 +111,7 @@ public function setIfNotExists($key, $value) {
   }
 
   /**
-   * Stores a particular key/value pair in this SharedTempStore.
-   *
-   * Only stores the given key/value pair if it does not exist yet or is owned
-   * by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already exists and is not owned
-   *   by $this->user.
-   *
-   * @throws \Drupal\Core\TempStore\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
+   * {@inheritdoc}
    */
   public function setIfOwner($key, $value) {
     if ($this->setIfNotExists($key, $value)) {
@@ -182,15 +127,7 @@ public function setIfOwner($key, $value) {
   }
 
   /**
-   * Stores a particular key/value pair in this SharedTempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @throws \Drupal\Core\TempStore\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
+   * {@inheritdoc}
    */
   public function set($key, $value) {
     if (!$this->lockBackend->acquire($key)) {
@@ -210,14 +147,7 @@ public function set($key, $value) {
   }
 
   /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
+   * {@inheritdoc}
    */
   public function getMetadata($key) {
     // Fetch the key/value pair and its metadata.
@@ -230,13 +160,7 @@ public function getMetadata($key) {
   }
 
   /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @throws \Drupal\Core\TempStore\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
+   * {@inheritdoc}
    */
   public function delete($key) {
     if (!$this->lockBackend->acquire($key)) {
@@ -250,19 +174,7 @@ public function delete($key) {
   }
 
   /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * Only delete the given key if it is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
-   *
-   * @throws \Drupal\Core\TempStore\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
+   * {@inheritdoc}
    */
   public function deleteIfOwner($key) {
     if (!$object = $this->storage->get($key)) {
diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php
index 90e816a7dd..3f16a2f1ca 100644
--- a/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php
+++ b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php
@@ -69,7 +69,7 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory,
    *   SharedTempStore is owned by the currently authenticated user, or by the
    *   active anonymous session if no user is logged in.
    *
-   * @return \Drupal\Core\TempStore\SharedTempStore
+   * @return \Drupal\Core\TempStore\SharedTempStoreInterface
    *   An instance of the key/value store.
    */
   public function get($collection, $owner = NULL) {
diff --git a/core/lib/Drupal/Core/TempStore/SharedTempStoreInterface.php b/core/lib/Drupal/Core/TempStore/SharedTempStoreInterface.php
new file mode 100644
index 0000000000..2e543245a1
--- /dev/null
+++ b/core/lib/Drupal/Core/TempStore/SharedTempStoreInterface.php
@@ -0,0 +1,135 @@
+<?php
+
+namespace Drupal\Core\TempStore;
+
+/**
+ * An interface for shared temporary data stores.
+ *
+ * A shared temporary data store can be used to make temporary, non-cache data
+ * available across requests.
+ *
+ * A shared temporary data store is different from a cache, because the data in
+ * it is not yet saved permanently and so it cannot be rebuilt. Typically, a
+ * shared temporary data store might be used to store work in progress that is
+ * later saved permanently elsewhere, e.g. autosave data, multistep forms, or
+ * in-progress changes to complex configuration that are not ready to be saved.
+ *
+ * Each shared temporary data store belongs to a particular owner (e.g. a user,
+ * session, or process). Multiple owners may use the same key/value, and the
+ * owner should be stored along with the key/value pair.
+ *
+ * Every key is unique, so a hared temporary data store can check whether a
+ * particular key is already set by a different owner. This is useful for
+ * informing one owner that the data is already in use by another; for example,
+ * to let one user know that another user is in the process of editing certain
+ * data, or even to restrict other users from editing it at the same time. It is
+ * the responsibility of the implementation to decide when and whether one owner
+ * can use or update another owner's data.
+ *
+ * If you want to be able to ensure that the data belongs to the current user,
+ * use PrivateTempStoreInterface.
+ *
+ * @see \Drupal\Core\TempStore\PrivateTempStoreInterface
+ */
+interface SharedTempStoreInterface {
+
+
+  /**
+   * Retrieves a value from the store for a given key.
+   *
+   * @param string $key
+   *   The key of the data to retrieve.
+   *
+   * @return mixed
+   *   The data associated with the key, or NULL if the key does not exist.
+   */
+  public function get($key);
+
+  /**
+   * Retrieves a value from the store for a given key.
+   *
+   * Only returns the value if the value is owned by the owner of the store.
+   *
+   * @param string $key
+   *   The key of the data to retrieve.
+   *
+   * @return mixed
+   *   The data associated with the key, or NULL if the key does not exist.
+   */
+  public function getIfOwner($key);
+
+  /**
+   * Stores a particular key/value pair in the store.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   * @param mixed $value
+   *   The data to store.
+   */
+  public function set($key, $value);
+
+  /**
+   * Stores a particular key/value pair in the store.
+   *
+   * Only stores the given key/value pair if it does not exist yet or is owned
+   * by the owner of the store.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   * @param mixed $value
+   *   The data to store.
+   *
+   * @return bool
+   *   TRUE if the data was set, or FALSE if it already exists and is not owned
+   *   by the owner of the TempStore.
+   */
+  public function setIfOwner($key, $value);
+
+  /**
+   * Stores a particular key/value pair only if the key doesn't already exist.
+   *
+   * @param string $key
+   *   The key of the data to check and store.
+   * @param mixed $value
+   *   The data to store.
+   *
+   * @return bool
+   *   TRUE if the data was set, or FALSE if it already existed.
+   */
+  public function setIfNotExists($key, $value);
+
+  /**
+   * Deletes data from the store for a given key and releases the lock on it.
+   *
+   * @param string $key
+   *   The key of the data to delete.
+   */
+  public function delete($key);
+
+  /**
+   * Deletes data from the store for a given key and releases the lock on it.
+   *
+   * Only delete the given key if it is owned by the owner of the store.
+   *
+   * @param string $key
+   *   The key of the data to delete.
+   *
+   * @return bool
+   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
+   *   is not owned by the owner of the store.
+   */
+  public function deleteIfOwner($key);
+
+  /**
+   * Returns the metadata associated with a particular key/value pair.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   *
+   * @return mixed
+   *   An object with the owner and updated time if the key has a value, or
+   *   NULL otherwise.
+   */
+  public function getMetadata($key);
+
+}
