MemoryScope Class
- java.
lang. Object - com.
microsoft. bot. dialogs. memory. scopes. MemoryScope
- com.
public abstract class MemoryScope
MemoryScope represents a named memory scope abstract class.
Constructor Summary
| Constructor | Description |
|---|---|
| MemoryScope(String name, Boolean includeInSnapshot) |
Initializes a new instance of the class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.util.concurrent.CompletableFuture<java.lang.Void> |
delete(DialogContext dialogContext)
Deletes any state in storage and the cache for this. |
| java.lang.Boolean | getIncludeInSnapshot() |
| abstract java.lang.Object |
getMemory(DialogContext dialogContext)
Get the backing memory for this scope. |
| java.lang.String | getName() |
| 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. |
| void | setIncludeInSnapshot(Boolean withIncludeInSnapshot) |
| abstract void |
setMemory(DialogContext dialogContext, Object memory)
Changes the backing object for the memory scope. |
| void | setName(String withName) |
Methods inherited from java.lang.Object
Constructor Details
MemoryScope
public MemoryScope(String name, Boolean includeInSnapshot)
Initializes a new instance of the class.
Parameters:
Method Details
delete
public CompletableFuture
Deletes any state in storage and the cache for this.
Parameters:
Returns:
getIncludeInSnapshot
public Boolean getIncludeInSnapshot()
Returns:
getMemory
public abstract Object getMemory(DialogContext dialogContext)
Get the backing memory for this scope.
Parameters:
Returns:
getName
public String getName()
Returns:
load
public CompletableFuture
Populates the state cache for this from the storage layer.
Parameters:
Returns:
saveChanges
public CompletableFuture
Writes the state cache for this to the storage layer.
Parameters:
Returns:
setIncludeInSnapshot
public void setIncludeInSnapshot(Boolean withIncludeInSnapshot)
Parameters:
setMemory
public abstract void setMemory(DialogContext dialogContext, Object memory)
Changes the backing object for the memory scope.
Parameters:
setName
public void setName(String withName)
Parameters: