1
package edu.ucsb.eucalyptus.cloud.state;
3
import java.lang.ref.WeakReference;
5
public class WeakInteraction<REF, MEMENTO> {
6
private WeakReference<REF> reference;
7
private String referenceKey;
8
private State boundState;
9
private MEMENTO memento;
11
public WeakInteraction() {
12
this.boundState = State.GENERATING;
15
public void generate( final WeakReference<REF> reference, final MEMENTO memento ) {
16
this.reference = reference;
17
this.memento = memento;
18
this.boundState = State.GENERATING;
21
public WeakReference<REF> getReference() {
25
private void setReference( final WeakReference<REF> reference ) {
26
this.reference = reference;
29
public State getBoundState() {
33
private void setBoundState( final State boundState ) {
34
this.boundState = boundState;
37
public MEMENTO getMemento() {
41
private void setMemento( final MEMENTO memento ) {
42
this.memento = memento;