1 4 package com.tc.object; 5 6 import com.tc.object.bytecode.Clearable; 7 import com.tc.util.Assert; 8 9 import java.lang.ref.ReferenceQueue ; 10 11 public class TCObjectLogical extends TCObjectImpl { 12 13 public TCObjectLogical(ReferenceQueue queue, ObjectID id, Object peer, TCClass tcc) { 14 super(queue, id, peer, tcc); 15 } 16 17 public void logicalInvoke(int method, String methodName, Object [] parameters) { 18 this.markAccessed(); 19 getObjectManager().getTransactionManager().logicalInvoke(this, method, methodName, parameters); 20 } 21 22 protected boolean isEvictable() { 23 if (getPeerObject() instanceof Clearable) { 24 return true; 25 } else { 26 return false; 27 } 28 } 29 30 protected int clearReferences(Object pojo, int toClear) { 31 Assert.assertTrue(pojo instanceof Clearable); 32 Clearable clearable = (Clearable) pojo; 33 return clearable.clearReferences(toClear); 34 } 35 36 } 37 | Popular Tags |