inspect::TreeServerSendPreference

#include <tree_handler_settings.h>

TreeServerSendPreference describes how the Inspect VMO should be served.

Summary

The server has a primary behavior and a failure behavior. These describe the way that the Inspector's VMO handle will be duplicated. The options in general are:

  • Frozen: this is copy-on-write.
  • Live: updates to the server side VMO propagate to the client. The client is read-only.
  • DeepCopy: completely copies the VMO data into a new VMO.

The primary behavior is always configurable. By default, the primary behavior is Frozen.

The failure behavior is configurable when the primary behavior is Frozen. In that case, the failure behavior can be set to either Live or DeepCopy. The default is Live.

The ultimate fallback behavior is always to send a Live VMO.

Constructors and Destructors

TreeServerSendPreference()
Default behavior is to send a Frozen VMO; on failure, it will send a Live VMO.

Public types

Type{
  Frozen,
  Live,
  DeepCopy
}
enum
Defines the behavior of the VMO sent over this service.

Public functions

FailureBehavior()
constexpr cpp17::optional< Type >
PrimaryBehavior()
constexpr Type

Public static functions

DeepCopy()
Send a true copy of the VMO.
Frozen(Type failure)
Freeze the VMO if possible.
Live()
Send a live VMO.

Public types

Type

 Type

Defines the behavior of the VMO sent over this service.

Properties
DeepCopy

The VMO is fully copied before being sent.

Frozen

The VMO is copy-on-write.

Live

The VMO is a live reference to the original.

Updates to the server side affect the client side.

Public functions

FailureBehavior

constexpr cpp17::optional< Type > FailureBehavior()

PrimaryBehavior

constexpr Type PrimaryBehavior()

TreeServerSendPreference

 TreeServerSendPreference()=default

Default behavior is to send a Frozen VMO; on failure, it will send a Live VMO.

Public static functions

DeepCopy

constexpr TreeServerSendPreference DeepCopy()

Send a true copy of the VMO.

Frozen

constexpr TreeServerSendPreference Frozen(
  Type failure
)

Freeze the VMO if possible.

On failure, do failure. failure should not be Type::Frozen.

Live

constexpr TreeServerSendPreference Live()

Send a live VMO.