comparison src/org/dancres/blitz/notify/VisibilityImplState.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.notify;
2
3 import java.io.Serializable;
4
5 import java.rmi.MarshalledObject;
6
7 import org.dancres.blitz.txn.TxnId;
8
9 import org.dancres.blitz.mangler.MangledEntry;
10
11 import org.dancres.blitz.oid.OID;
12
13 /**
14 Used to contain a Memento (see GOF) of an EventGenerator which can be
15 saved to/loaded from disk.
16 */
17 class VisibilityImplState implements EventGeneratorState {
18
19 private OID theOID;
20 private MangledEntry[] theTemplates;
21 private MarshalledObject theHandback;
22 private MarshalledObject theListener;
23 private long theSourceId;
24 private long theSeqNum;
25 private long theLeaseTime;
26 private TxnId theTxnId;
27 private boolean doVisible;
28
29 VisibilityImplState(OID aOID, MangledEntry[] aTemplates,
30 MarshalledObject aHandback,
31 MarshalledObject aListener,
32 long aSourceId, long aSeqNum, long aLeaseTime,
33 TxnId anId, boolean justVisible) {
34 theOID = aOID;
35 theTemplates = aTemplates;
36 theHandback = aHandback;
37 theListener = aListener;
38 theSourceId = aSourceId;
39 theSeqNum = aSeqNum;
40 theLeaseTime = aLeaseTime;
41 theTxnId = anId;
42 doVisible = justVisible;
43 }
44
45 public EventGenerator getGenerator() {
46 return VisibilityImpl.restoreGenerator(this);
47 }
48
49 public boolean isPersistent() {
50 return (theTxnId == null);
51 }
52
53 public OID getOID() {
54 return theOID;
55 }
56
57 boolean getJustVisible() {
58 return doVisible;
59 }
60
61 MangledEntry[] getTemplates() {
62 return theTemplates;
63 }
64
65 MarshalledObject getHandback() {
66 return theHandback;
67 }
68
69 MarshalledObject getListener() {
70 return theListener;
71 }
72
73 long getSourceId() {
74 return theSourceId;
75 }
76
77 long getSeqNum() {
78 return theSeqNum;
79 }
80
81 long getLeaseTime() {
82 return theLeaseTime;
83 }
84 }