01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.objectserver.core.api;
05:
06: import com.tc.io.TCByteBufferOutputStream;
07: import com.tc.object.ObjectID;
08: import com.tc.object.dna.api.DNA;
09: import com.tc.object.dna.api.DNAException;
10: import com.tc.object.dna.impl.ObjectStringSerializer;
11: import com.tc.object.tx.TransactionID;
12: import com.tc.objectserver.api.ObjectInstanceMonitor;
13: import com.tc.objectserver.impl.ManagedObjectReference;
14: import com.tc.objectserver.managedobject.BackReferences;
15: import com.tc.objectserver.managedobject.ManagedObjectTraverser;
16: import com.tc.objectserver.mgmt.ManagedObjectFacade;
17:
18: import java.util.Set;
19:
20: /**
21: * @author steve
22: */
23: public interface ManagedObject {
24:
25: public ObjectID getID();
26:
27: public ManagedObjectReference getReference();
28:
29: public Set getObjectReferences();
30:
31: public void apply(DNA dna, TransactionID txnID,
32: BackReferences includeIDs,
33: ObjectInstanceMonitor instanceMonitor,
34: boolean ignoreIfOlderDNA) throws DNAException;
35:
36: public void toDNA(TCByteBufferOutputStream out,
37: ObjectStringSerializer serializer);
38:
39: public boolean isDirty();
40:
41: public void setIsDirty(boolean isDirty);
42:
43: public ManagedObjectFacade createFacade(int limit);
44:
45: public boolean isNew();
46:
47: public ManagedObjectState getManagedObjectState();
48:
49: public void addObjectReferencesTo(ManagedObjectTraverser traverser);
50:
51: public long getVersion();
52: }
|