public class DatastoreStateInterface extends Object implements StateInterface
| Constructor and Description |
|---|
DatastoreStateInterface(String kind,
String namespace)
Initialize a Datastore state interface
|
DatastoreStateInterface(String kind,
String namespace,
com.google.cloud.http.HttpTransportOptions opts)
Initialize a Datastore state interface with transport options
|
DatastoreStateInterface(String kind,
String namespace,
String project)
Initialize a Datastore state interface using datastore in another project
|
DatastoreStateInterface(String kind,
String namespace,
String project,
com.google.cloud.http.HttpTransportOptions opts)
Initialize a Datastore state interface using datastore in another project with transport
options
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAll()
Flush all keys in the state implementation
|
void |
done()
Notify state implementation no further processing will occur
|
void |
initialize()
Perform any setup required to read and write state
|
<T> StateCursor<T> |
newCursor(Class<T> stateClass,
boolean transaction)
Allocate new state cursor
|
public DatastoreStateInterface(String kind, String namespace)
kind - kind value to use for stored objectsnamespace - Datastore namespacepublic DatastoreStateInterface(String kind, String namespace, com.google.cloud.http.HttpTransportOptions opts)
kind - kind value to use for stored objectsnamespace - Datastore namespaceopts - HttpTransportOptions for datastore clientpublic DatastoreStateInterface(String kind, String namespace, String project)
kind - kind value to use for stored objectsnamespace - Datastore namespaceproject - Project identifierpublic DatastoreStateInterface(String kind, String namespace, String project, com.google.cloud.http.HttpTransportOptions opts)
kind - kind value to use for stored objectsnamespace - Datastore namespaceproject - Project identifieropts - HttpTransportOptions for datastore clientpublic <T> StateCursor<T> newCursor(Class<T> stateClass, boolean transaction) throws StateException
newCursor in interface StateInterfaceT - Class used in state storagestateClass - Class used in state storagetransaction - If true, allocate cursor as a transactionStateException - StateExceptionpublic void done()
noop for datastore
done in interface StateInterfacepublic void initialize()
throws StateException
initialize in interface StateInterfaceStateException - StateExceptionpublic void deleteAll()
throws StateException
deleteAll in interface StateInterfaceStateException - StateExceptionCopyright © 2022. All rights reserved.