public interface

IQuickStateObject

com.pnfsoftware.jeb.core.units.IQuickStateObject

Class Overview

Quick state objects represent the state of a unit. Their primary purpose is to server as backup if JDB2 reloading fails, for any reason (corrupted database, compatibility issue, etc.).

Implementations of this interface must be serializable. Implementations must be simple; it is recommended to use simple types such as Strings or primitives, as well as basic Java Collections classes, and avoid referencing complex objects from the project graph.

Quick state objects are produced (optionally) by units.

See Also

Summary

Public Methods
abstract boolean isTargetUnit(IUnit unit)
Determine if a unit is the target unit of this object, ie, if its state can be (partially) restored using this object.
abstract boolean reload(IUnit unit)
Reload (restore) the state of a unit using this object.

Public Methods

public abstract boolean isTargetUnit (IUnit unit)

Determine if a unit is the target unit of this object, ie, if its state can be (partially) restored using this object.

Parameters
unit a candidate unit. Note that this unit may be unprocessed!
Returns
  • success indicator

public abstract boolean reload (IUnit unit)

Reload (restore) the state of a unit using this object. Before calling this method, isTargetUnit(IUnit) should have been called and returned true.

Parameters
unit the target unit
Returns
  • success indicator