Module java.base
Package jdk.crac

Interface Resource

All Known Implementing Classes:
Context

public interface Resource
An interface for receiving checkpoint/restore notifications.

The class that is interested in receiving a checkpoint/restore notification implements this interface, and the object created with that class is registered with a Context, using register method.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterRestore(Context<? extends Resource> context)
    Invoked by a Context as a notification about restore.
    void
    beforeCheckpoint(Context<? extends Resource> context)
    Invoked by a Context as a notification about checkpoint.
  • Method Details

    • beforeCheckpoint

      void beforeCheckpoint(Context<? extends Resource> context) throws Exception
      Invoked by a Context as a notification about checkpoint.
      Parameters:
      context - Context providing notification
      Throws:
      Exception - if the method have failed
    • afterRestore

      void afterRestore(Context<? extends Resource> context) throws Exception
      Invoked by a Context as a notification about restore.
      Parameters:
      context - Context providing notification
      Throws:
      Exception - if the method have failed