Brooklyn

brooklyn.entity.rebind
[Java] Interface RebindSupport


public interface RebindSupport

Supporter instance for behaviour related to rebinding a given entity/location/policy. For example, the brooklyn framework may call entity.getRebindSupport().getMemento() and persist this using a BrooklynMementoPersister. Later (e.g. after a brooklyn restart) a new entity instance may be created and populated by the framework calling entity.getRebindSupport().reconstruct(rebindContext, memento).

Authors:
aled


Method Summary
java.lang.Object getMemento()

Creates a memento representing this entity's current state.

void reconstruct(RebindContext rebindContext, java.lang.Object memento)

Reconstructs this entity, given a memento of its state.

 

Method Detail

getMemento

public java.lang.Object getMemento()
Creates a memento representing this entity's current state. This is useful for when restarting brooklyn.


reconstruct

public void reconstruct(RebindContext rebindContext, java.lang.Object memento)
Reconstructs this entity, given a memento of its state. Sets the internal state (including id and config keys), and sets the parent/children/locations of this entity. Implementations should be very careful to not invoke or inspect these other entities/locations, as they may also be being reconstructed at this time. Called before rebind.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.