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.persistence.api;
05:
06: import com.tc.object.ObjectID;
07: import com.tc.objectserver.core.api.ManagedObject;
08: import com.tc.text.PrettyPrinter;
09: import com.tc.util.SyncObjectIdSet;
10:
11: import java.util.Collection;
12: import java.util.Map;
13: import java.util.Set;
14:
15: public interface ManagedObjectPersistor {
16:
17: public Set loadRoots();
18:
19: public Set loadRootNames();
20:
21: public ObjectID loadRootID(String name);
22:
23: public void addRoot(PersistenceTransaction tx, String name,
24: ObjectID id);
25:
26: public ManagedObject loadObjectByID(ObjectID id);
27:
28: public long nextObjectIDBatch(int batchSize);
29:
30: public void setNextAvailableObjectID(long startID);
31:
32: public SyncObjectIdSet getAllObjectIDs();
33:
34: public void saveObject(PersistenceTransaction tx,
35: ManagedObject managedObject);
36:
37: public void saveAllObjects(PersistenceTransaction tx,
38: Collection managed);
39:
40: public void deleteAllObjectsByID(PersistenceTransaction tx,
41: Collection ids);
42:
43: public void prettyPrint(PrettyPrinter out);
44:
45: public Map loadRootNamesToIDs();
46:
47: }
|