KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > persistence > api > ManagedObjectPersistor


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.objectserver.persistence.api;
5
6 import com.tc.object.ObjectID;
7 import com.tc.objectserver.core.api.ManagedObject;
8 import com.tc.text.PrettyPrinter;
9 import com.tc.util.SyncObjectIdSet;
10
11 import java.util.Collection JavaDoc;
12 import java.util.Map JavaDoc;
13 import java.util.Set JavaDoc;
14
15 public interface ManagedObjectPersistor {
16
17   public Set loadRoots();
18
19   public Set loadRootNames();
20
21   public ObjectID loadRootID(String JavaDoc name);
22   
23   public void addRoot(PersistenceTransaction tx, String JavaDoc name, ObjectID id);
24
25   public ManagedObject loadObjectByID(ObjectID id);
26
27   public long nextObjectIDBatch(int batchSize);
28
29   public void setNextAvailableObjectID(long startID);
30   
31   public SyncObjectIdSet getAllObjectIDs();
32
33   public void saveObject(PersistenceTransaction tx, ManagedObject managedObject);
34
35   public void saveAllObjects(PersistenceTransaction tx, Collection JavaDoc managed);
36
37   public void deleteAllObjectsByID(PersistenceTransaction tx, Collection JavaDoc ids);
38   
39   public void prettyPrint(PrettyPrinter out);
40
41   public Map JavaDoc loadRootNamesToIDs();
42
43 }
44
Popular Tags