1 5 package com.tc.objectserver.impl; 6 7 import com.tc.exception.ImplementMe; 8 import com.tc.object.ObjectID; 9 import com.tc.objectserver.core.api.ManagedObject; 10 import com.tc.objectserver.persistence.api.ManagedObjectStore; 11 import com.tc.objectserver.persistence.api.PersistenceTransaction; 12 import com.tc.text.PrettyPrinter; 13 import com.tc.util.SyncObjectIdSet; 14 15 import java.util.Collection ; 16 import java.util.Map ; 17 import java.util.Set ; 18 19 public class TestManagedObjectStore implements ManagedObjectStore { 20 21 public boolean addNewWasCalled = false; 22 public boolean containsKey; 23 public SyncObjectIdSet keySet; 24 public ManagedObject managedObject; 25 private int count; 26 27 public boolean containsObject(ObjectID id) { 28 return containsKey; 29 } 30 31 public void addNewObject(ManagedObject managed) { 32 addNewWasCalled = true; 33 count++; 34 } 35 36 public SyncObjectIdSet getAllObjectIDs() { 37 return keySet; 38 } 39 40 public int getObjectCount() { 41 return count; 42 } 43 44 public ManagedObject getObjectByID(ObjectID id) { 45 return managedObject; 46 } 47 48 public void commitObject(PersistenceTransaction tx, ManagedObject object) { 49 return; 50 } 51 52 public void commitAllObjects(PersistenceTransaction tx, Collection c) { 53 return; 54 } 55 56 public PrettyPrinter prettyPrint(PrettyPrinter out) { 57 return out.print(getClass().getName()); 58 } 59 60 public void removeAllObjectsByIDNow(PersistenceTransaction tx, Collection objectIds) { 61 count -= objectIds.size(); 62 return; 63 } 64 65 public void shutdown() { 66 return; 67 } 68 69 public boolean inShutdown() { 70 return false; 71 } 72 73 public ObjectID getRootID(String name) { 74 return null; 75 } 76 77 public Set getRoots() { 78 return null; 79 } 80 81 public Set getRootNames() { 82 return null; 83 } 84 85 public void addNewRoot(PersistenceTransaction tx, String rootName, ObjectID id) { 86 return; 87 } 88 89 public long nextObjectIDBatch(int batchSize) { 90 throw new ImplementMe(); 91 } 92 93 public void setNextAvailableObjectID(long startID) { 94 throw new ImplementMe(); 95 } 96 97 public Map getRootNamesToIDsMap() { 98 return null; 99 } 100 101 } | Popular Tags |