1 5 package com.tc.objectserver.impl; 6 7 import com.tc.object.ObjectID; 8 import com.tc.objectserver.core.api.ManagedObject; 9 10 import gnu.trove.TLinkable; 11 12 public class FaultingManagedObjectReference implements ManagedObjectReference { 13 14 private final ObjectID id; 15 private boolean inProgress; 16 private boolean processPending; 17 18 public FaultingManagedObjectReference(ObjectID id) { 19 this.id = id; 20 this.inProgress = true; 21 } 22 23 public boolean isFaultingInProgress() { 24 return inProgress; 25 } 26 27 public void faultingComplete() { 28 this.inProgress = false; 29 } 30 31 public boolean getProcessPendingOnRelease() { 32 return this.processPending; 33 } 34 35 public void setProcessPendingOnRelease(boolean b) { 36 this.processPending = b; 37 } 38 39 public void setRemoveOnRelease(boolean removeOnRelease) { 40 } 42 43 public boolean isRemoveOnRelease() { 44 return true; 45 } 46 47 public void markReference() { 48 } 50 51 public void unmarkReference() { 52 } 54 55 public boolean isReferenced() { 56 return true; 57 } 58 59 public boolean isNew() { 60 return false; 61 } 62 63 public ManagedObject getObject() { 64 throw new AssertionError ("This should never be called"); 65 } 66 67 public ObjectID getObjectID() { 68 return id; 69 } 70 71 public void markAccessed() { 72 } 74 75 public void clearAccessed() { 76 } 78 79 public boolean recentlyAccessed() { 80 return true; 81 } 82 83 public int accessCount(int factor) { 84 return 0; 85 } 86 87 public TLinkable getNext() { 88 return null; 90 } 91 92 public TLinkable getPrevious() { 93 return null; 95 } 96 97 public void setNext(TLinkable linkable) { 98 throw new AssertionError ("This should never be called"); 100 } 101 102 public void setPrevious(TLinkable linkable) { 103 throw new AssertionError ("This should never be called"); 105 } 106 107 public boolean canEvict() { 108 return false; 109 } 110 111 public String toString() { 112 return "FaultingManagedObjectReference [ " + id + " inProgress : " + inProgress + " processPending : " 113 + processPending + " ]"; 114 } 115 116 } 117 | Popular Tags |