Interface: ReplicatedEntityCommandContext

akkaserverless.replicatedentity. ReplicatedEntityCommandContext

Context for a Replicated Entity command handler.

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:

state :module:akkaserverless.replicatedentity.ReplicatedData

The Replicated Data state for a Replicated Entity. It may only be set once, if it's already set, an error will be thrown.

Type:
Inherited From:

Methods


delete()

Delete this Replicated Entity.

Inherited From:

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.