Top Description Constructors Methods
org.crac

public abstract Class Context<R extends org.crac.Resource>

extends Object
implements Resource
Class Inheritance
All Implemented Interfaces
org.crac.Resource
Known Direct Subclasses
org.crac.GlobalContextWrapper

A Resource that allows other Resources to be registered with it.

Context implementation overrides beforeCheckpoint and afterRestore, defining how the notification about checkpoint and restore will be distributed by the Context hierarchy.

A Context implementor is encouraged to respect properties of the global Context.

Constructor Summary

AccessConstructor and Description
protected
Context()

Creates a Context.

Method Summary

Modifier and TypeMethod and Description
public abstract void
afterRestore(Context<? extends Resource>
Context providing notification
context
)

Redeclares org.crac.Resource.afterRestore.

Invoked by a Context as a notification about restore.
public abstract void
beforeCheckpoint(Context<? extends Resource>
Context providing notification
context
)

Redeclares org.crac.Resource.beforeCheckpoint.

Invoked by a Context as a notification about checkpoint.
public abstract void
register(R
Resource to be registered.
resource
)

Registers a Resource with this Context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Contextback to summary
protected Context()

Creates a Context.

Method Detail

afterRestoreback to summary
public abstract void afterRestore(Context<? extends Resource> context) throws RestoreException

Redeclares org.crac.Resource.afterRestore.

Doc from org.crac.Resource.afterRestore.

Invoked by a Context as a notification about restore.

Parameters
context:Context<? extends Resource>

Context providing notification

Annotations
@Override
beforeCheckpointback to summary
public abstract void beforeCheckpoint(Context<? extends Resource> context) throws CheckpointException

Redeclares org.crac.Resource.beforeCheckpoint.

Doc from org.crac.Resource.beforeCheckpoint.

Invoked by a Context as a notification about checkpoint.

Parameters
context:Context<? extends Resource>

Context providing notification

Annotations
@Override
registerback to summary
public abstract void register(R resource)

Registers a Resource with this Context.

Parameters
resource:R

Resource to be registered.

Exceptions
NullPointerException:
if resource is null