Interface: ValueEntityCommandContext

akkaserverless.ValueEntity. ValueEntityCommandContext

Context for an value entity command.

Extends

Members


commandId :Long

Type:
  • Long
Inherited From:

entityId :string

Type:
  • string
Inherited From:

metadata :module:akkaserverless.Metadata

Type:
Inherited From:

replyMetadata :module:akkaserverless.Metadata

Type:
Inherited From:

Methods


deleteState()

Delete this entity.


effect(method, message [, synchronous] [, metadata] [, internalCall])

DEPRECATED. Emit an effect after processing this command.

Parameters:
Name Type Argument Description
method any

The entity service method to invoke.

message object

The message to send to that service.

synchronous boolean <optional>

Whether the effect should be execute synchronously or not.

metadata module:akkaserverless.Metadata <optional>

Metadata to send with the effect.

internalCall boolean <optional>

For internal calls to this deprecated function.

Inherited From:

fail(msg)

Fail handling this command.

An alternative to using this is to return a failed Reply created with 'ReplyFactory.failed'.

Parameters:
Name Type Description
msg string

The failure message.

Inherited From:
Throws:

An error that captures the failure message. Note that even if you catch the error thrown by this method, the command will still be failed with the given message.


forward(method, message [, metadata] [, internalCall])

DEPRECATED. Forward this command to another service component call, use 'ReplyFactory.forward' instead.

Parameters:
Name Type Argument Description
method any

The service component method to invoke.

message object

The message to send to that service component.

metadata module:akkaserverless.Metadata <optional>

Metadata to send with the forward.

internalCall boolean <optional>

For internal calls to this deprecated function.

Inherited From:

thenForward(method, message, metadata)

DEPRECATED. Forward this command to another service component call.

Parameters:
Name Type Description
method any

The service component method to invoke.

message object

The message to send to that service component.

metadata module:akkaserverless.Metadata

Metadata to send with the forward.

Inherited From:
Deprecated:
  • Since version 0.7. Will be deleted in version 0.8. Use 'forward' instead.

updateState(newState)

Persist the updated state.

The state won't be persisted until the reply is sent to the proxy. Then, the state will be persisted before the reply is sent back to the client.

Parameters:
Name Type Description
newState module:akkaserverless.Serializable

The state to store.