MemoryStorage Class

  • java.lang.Object
    • com.microsoft.bot.builder.MemoryStorage

Implements

public class MemoryStorage
implements Storage

A storage layer that uses an in-memory dictionary.

Constructor Summary

Constructor Description
MemoryStorage()

Initializes a new instance of the MemoryStorage class.

MemoryStorage(Map<String,JsonNode> values)

Initializes a new instance of the MemoryStorage class.

Method Summary

Modifier and Type Method and Description
java.util.concurrent.CompletableFuture<java.lang.Void> delete(String[] keys)

Deletes storage items from storage.

java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> read(String[] keys)

Reads storage items from storage.

java.util.concurrent.CompletableFuture<java.lang.Void> write(Map<String,Object> changes)

Writes storage items to storage.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

MemoryStorage

public MemoryStorage()

Initializes a new instance of the MemoryStorage class.

MemoryStorage

public MemoryStorage(Map values)

Initializes a new instance of the MemoryStorage class.

Parameters:

values - A pre-existing dictionary to use; or null to use a new one.

Method Details

delete

public CompletableFuture delete(String[] keys)

Deletes storage items from storage.

Parameters:

keys - keys of the items to delete

Returns:

A task that represents the work queued to execute.

read

public CompletableFuture> read(String[] keys)

Reads storage items from storage.

Parameters:

keys - keys of the items to read

Returns:

A task that represents the work queued to execute. If the activities are successfully sent, the task result contains the items read, indexed by key.

write

public CompletableFuture write(Map changes)

Writes storage items to storage.

Parameters:

changes - The items to write, indexed by key.

Returns:

A task that represents the work queued to execute.

Applies to