java.lang.Object
jdk.crac.Context<R>
- All Implemented Interfaces:
Resource
A
Resource
that allows other Resource
s 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
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
afterRestore
(Context<? extends Resource> context) Invoked by aContext
as a notification about restore.abstract void
beforeCheckpoint
(Context<? extends Resource> context) Invoked by aContext
as a notification about checkpoint.abstract void
Registers aResource
with thisContext
.
-
Constructor Details
-
Context
protected Context()Creates aContext
.
-
-
Method Details
-
beforeCheckpoint
public abstract void beforeCheckpoint(Context<? extends Resource> context) throws CheckpointException Description copied from interface:Resource
Invoked by aContext
as a notification about checkpoint.- Specified by:
beforeCheckpoint
in interfaceResource
- Parameters:
context
-Context
providing notification- Throws:
CheckpointException
-
afterRestore
Description copied from interface:Resource
Invoked by aContext
as a notification about restore.- Specified by:
afterRestore
in interfaceResource
- Parameters:
context
-Context
providing notification- Throws:
RestoreException
-
register
Registers aResource
with thisContext
.- Parameters:
resource
-Resource
to be registered.- Throws:
NullPointerException
- ifresource
isnull
-