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
-
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
, ornull
if no data is found or loading fails.
-
save
Saves the given data to memory.- Parameters:
data
- the object of typeT
to save.
-