Interface IMemoryObject<T>

Type Parameters:
T - the type of the object to be stored and retrieved.
All Known Implementing Classes:
MemoryAccessToken, MemoryDeployment, MemoryResourceGroup, MemoryServiceKey, TemporaryMemoryAccessToken, TemporaryMemoryDeployment, TemporaryMemoryResourceGroup, TemporaryMemoryServiceKey

public interface IMemoryObject<T>
Generic interface for managing the storage and retrieval of data in memory.

The IMemoryObject interface defines methods for saving, loading, and checking the validity of data stored in memory. It is parameterized to support any data type.

  • Method Summary

    Modifier and Type
    Method
    Description
    Checks if the stored data is empty or invalid.
    Loads the data from memory.
    void
    save(T data)
    Saves the given data to memory.
  • Method Details

    • isEmpty

      Boolean isEmpty()
      Checks if the stored data is empty or invalid.
      Returns:
      true if the stored data is empty or invalid; false otherwise.
    • load

      T load()
      Loads the data from memory.
      Returns:
      the stored object of type T, or null if no data is found or loading fails.
    • save

      void save(T data)
      Saves the given data to memory.
      Parameters:
      data - the object of type T to save.