~ubuntu-core-dev/eucalyptus/ubuntu-karmic

« back to all changes in this revision

Viewing changes to clc/modules/core/src/edu/ucsb/eucalyptus/cloud/state/WeakInteraction.java

  • Committer: Dmitrii Zagorodnov
  • Date: 2009-01-27 21:53:41 UTC
  • mfrom: (25.1.112 eucalyptus-main)
  • Revision ID: dmitrii@cs.ucsb.edu-20090127215341-i0f0v6cmbpljmg02
merged with current main

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package edu.ucsb.eucalyptus.cloud.state;
 
2
 
 
3
import java.lang.ref.WeakReference;
 
4
 
 
5
public class WeakInteraction<REF, MEMENTO> {
 
6
  private WeakReference<REF> reference;
 
7
  private String referenceKey;
 
8
  private State boundState;
 
9
  private MEMENTO memento;
 
10
 
 
11
  public WeakInteraction() {
 
12
    this.boundState = State.GENERATING;
 
13
  }
 
14
 
 
15
  public void generate( final WeakReference<REF> reference, final MEMENTO memento ) {
 
16
    this.reference = reference;
 
17
    this.memento = memento;
 
18
    this.boundState = State.GENERATING;
 
19
  }
 
20
 
 
21
  public WeakReference<REF> getReference() {
 
22
    return reference;
 
23
  }
 
24
 
 
25
  private void setReference( final WeakReference<REF> reference ) {
 
26
    this.reference = reference;
 
27
  }
 
28
 
 
29
  public State getBoundState() {
 
30
    return boundState;
 
31
  }
 
32
 
 
33
  private void setBoundState( final State boundState ) {
 
34
    this.boundState = boundState;
 
35
  }
 
36
 
 
37
  public MEMENTO getMemento() {
 
38
    return memento;
 
39
  }
 
40
 
 
41
  private void setMemento( final MEMENTO memento ) {
 
42
    this.memento = memento;
 
43
  }
 
44
}