Show / Hide Table of Contents

Namespace Libplanet.Blockchain.Renderers

Classes

AnonymousActionRenderer<T>

An IActionRenderer<T> that invokes its callbacks. In other words, this is an IActionRenderer<T> version of AnonymousRenderer<T>.

This class is useful when you want an one-use ad-hoc implementation (i.e., Java-style anonymous class) of IActionRenderer<T> interface.

AnonymousRenderer<T>

A renderer that invokes its callbacks.

This class is useful when you want an one-use ad-hoc implementation (i.e., Java-style anonymous class) of IRenderer<T> interface.

AtomicActionRenderer<T>

A middleware to make action render events to satisfy transactions' atomicity.

Decorates an IActionRenderer<T> instance and filters out render events made by unsuccessful transactions (i.e., transactions with one or more exception-throwing actions).

DelayedActionRenderer<T>

An IActionRenderer<T> version of DelayedRenderer<T>.

Decorates an IActionRenderer<T> instance and delays the events until blocks are confirmed the certain number of blocks. When blocks are recognized the delayed events relevant to these blocks are relayed to the decorated IActionRenderer<T>.

DelayedRenderer<T>

Decorates an IRenderer<T> instance and delays the events until blocks are confirmed the certain number of blocks. When blocks are recognized the delayed events relevant to these blocks are relayed to the decorated IRenderer<T>.

LoggedActionRenderer<T>

Decorates an IActionRenderer<T> so that all event messages are logged. In other words, this is an IActionRenderer<T> version of LoggedRenderer<T>.

Every single event message causes two log messages: one is logged before rendering, and other one is logged after rendering. If any exception is thrown it is also logged with the log level (regardless of Level configuration).

LoggedRenderer<T>

Decorates an IRenderer<T> so that all event messages are logged.

Every single event message causes two log messages: one is logged before rendering, and other one is logged after rendering. If any exception is thrown it is also logged with the log level (regardless of Level configuration).

NonblockActionRenderer<T>

Decorates a IActionRenderer<T> instance and lets all rendering events be non-blocking.

Every method call on the renderer will immediately return and the rendering will be performed in a background thread. Note that the order of render events is still guaranteed. In other words, a later event never arrives before events earlier than it.

NonblockRenderer<T>

Decorates a IRenderer<T> instance and lets all rendering events be non-blocking.

Every method call on the renderer will immediately return and the rendering will be performed in a background thread. Note that the order of render events is still guaranteed. In other words, a later event never arrives before events earlier than it.

Interfaces

IActionRenderer<T>

Listens state changes of every step of actions, besides blocks, on a BlockChain<T>. If you need more fine-grained events than IRenderer<T>, implement this interface instead.

The invocation order of methods for each Block<T> are:

  1. RenderReorg(Block<T>, Block<T>, Block<T>) (one time)
  2. UnrenderAction(IAction, IActionContext, IAccountStateDelta) & UnrenderActionError(IAction, IActionContext, Exception) (zero or more times)
  3. RenderBlock(Block<T>, Block<T>) (one time)
  4. RenderAction(IAction, IActionContext, IAccountStateDelta) & RenderActionError(IAction, IActionContext, Exception) (zero or more times)
  5. RenderBlockEnd(Block<T>, Block<T>) (one time)
  6. RenderReorgEnd(Block<T>, Block<T>, Block<T>) (one time)

IRenderer<T>

Listens state changes on a BlockChain<T>.

Usually, implementations of this interface purpose to update the in-memory game states (if exist), or send a signal to the UI thread (usually the main thread) so that the graphics on the display is redrawn.

The invocation order of methods for each Block<T> are:

  1. RenderReorg(Block<T>, Block<T>, Block<T>) (one time)
  2. RenderBlock(Block<T>, Block<T>) (one time)
  3. RenderReorgEnd(Block<T>, Block<T>, Block<T>) (one time)

Enums

NonblockRenderer<T>.FullMode

Specifies the behavior when the internal event queue is full so that no more event can be added.

Delegates

NonblockRenderer<T>.FullFallback

Customizes behavior when the internal event queue is full so that no more event can be added.

In This Article
Back to top Copyright © 2018–2021 Planetarium