BotStateMemoryScope<T> Class
- java.
lang. Object - com.
microsoft. bot. dialogs. memory. scopes. MemoryScope - com.
microsoft. bot. dialogs. memory. scopes. BotStateMemoryScope<T>
- com.
- com.
Type Parameters
- T
The BotState type.
public class BotStateMemoryScope<T>
extends MemoryScope
BotStateMemoryScope represents a BotState scoped memory.
Constructor Summary
| Constructor | Description |
|---|---|
| BotStateMemoryScope(Class<T> type, String name) |
Initializes a new instance of the Turn |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| final java.lang.Object |
getMemory(DialogContext dialogContext)
Get the backing memory for this scope. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
load(DialogContext dialogContext, Boolean force)
Populates the state cache for this from the storage layer. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
saveChanges(DialogContext dialogContext, Boolean force)
Writes the state cache for this to the storage layer. |
| final void |
setMemory(DialogContext dialogContext, Object memory)
Changes the backing Object for the memory scope. |
Methods inherited from MemoryScope
Methods inherited from java.lang.Object
Constructor Details
BotStateMemoryScope
public BotStateMemoryScope(Class
Initializes a new instance of the TurnMemoryScope class.
Parameters:
Method Details
getMemory
public final Object getMemory(DialogContext dialogContext)
Get the backing memory for this scope.
Overrides:
BotStateMemoryScope<T>.getMemory(DialogContext dialogContext)Parameters:
load
public CompletableFuture
Populates the state cache for this from the storage layer.
Overrides:
BotStateMemoryScope<T>.load(DialogContext dialogContext, Boolean force)Parameters:
saveChanges
public CompletableFuture
Writes the state cache for this to the storage layer.
Overrides:
BotStateMemoryScope<T>.saveChanges(DialogContext dialogContext, Boolean force)Parameters:
Returns:
setMemory
public final void setMemory(DialogContext dialogContext, Object memory)
Changes the backing Object for the memory scope.
Overrides:
BotStateMemoryScope<T>.setMemory(DialogContext dialogContext, Object memory)Parameters: