1 4 package com.tc.object; 5 6 import com.tc.exception.TCNonPortableObjectError; 7 import com.tc.object.dna.api.DNA; 8 import com.tc.object.tx.ClientTransactionManager; 9 import com.tc.object.tx.optimistic.OptimisticTransactionManager; 10 11 import java.lang.ref.ReferenceQueue ; 12 import java.util.Collection ; 13 import java.util.Map ; 14 15 18 public interface ClientObjectManager { 19 20 public Class getClassFor(String className, String loaderDesc) throws ClassNotFoundException ; 21 22 public boolean isManaged(Object pojo); 23 24 public void markReferenced(TCObject tcobj); 25 26 public boolean isPortableClass(Class clazz); 27 28 public boolean isPortableInstance(Object instance); 29 30 public void checkPortabilityOfField(Object value, String fieldName, Class targetClass) 31 throws TCNonPortableObjectError; 32 33 public void checkPortabilityOfLogicalAction(Object param, String methodName, Class logicalType) 34 throws TCNonPortableObjectError; 35 36 public void replaceRootIDIfNecessary(String rootName, ObjectID newRootID); 37 38 public Object lookupObject(ObjectID id) throws ClassNotFoundException ; 39 40 public Object lookupObjectNoDepth(ObjectID id) throws ClassNotFoundException ; 41 42 public TCObject lookupOrCreate(Object obj); 43 44 public TCObject lookupOrShare(Object pojo); 45 46 public ObjectID lookupExistingObjectID(Object obj); 47 48 public Object lookupRoot(String name); 49 50 public Object lookupOrCreateRootNoDepth(String rootName, Object object); 51 52 public Object lookupOrCreateRoot(String name, Object obj); 53 54 public Object lookupOrCreateRoot(String name, Object obj, boolean dsoFinal); 55 56 public TCObject lookupIfLocal(ObjectID id); 57 58 public TCObject lookup(ObjectID id) throws ClassNotFoundException ; 59 60 public TCObject lookupExistingOrNull(Object pojo); 61 62 public Collection getAllObjectIDsAndClear(Collection c); 63 64 public WeakObjectReference createNewPeer(TCClass clazz, DNA dna); 65 66 public WeakObjectReference createNewPeer(TCClass clazz, int size, ObjectID id, ObjectID parentID); 67 68 public TCClass getOrCreateClass(Class clazz); 69 70 public void setTransactionManager(ClientTransactionManager txManager); 71 72 public ClientTransactionManager getTransactionManager(); 73 74 public ReferenceQueue getReferenceQueue(); 75 76 public void shutdown(); 77 78 public void unpause(); 79 80 public void pause(); 81 82 public void starting(); 83 84 public Object deepCopy(Object source, OptimisticTransactionManager optimisticTxManager); 85 86 89 public Object createNewCopyInstance(Object source, Object parent); 90 91 public Object createParentCopyInstanceIfNecessary(Map visited, Map cloned, Object v); 92 93 public boolean isCreationInProgress(); 94 95 public void addPendingCreateObjectsToTransaction(); 96 97 public boolean hasPendingCreateObjects(); 98 99 public Object createOrReplaceRoot(String rootName, Object root); 100 } 101 | Popular Tags |