1 46 package org.mr.core.persistent; 47 48 import java.io.IOException ; 49 import java.nio.ByteBuffer ; 50 51 import org.mr.core.util.byteable.Byteable; 52 53 60 public interface PersistentManager { 61 public final static String SUBSCRIBERS_PERSISTENT_PREFIX = "subscribers_"; 62 int MAX_FILES_PER_STORAGE = 1000000; 63 64 public void recover(); 65 68 int[] getKeys(); 69 70 74 Object getPersistentObject(int i); 75 76 77 80 void deletePersistentObject(int i); 81 82 86 void savePersistentObject(int entryName, Byteable entry) throws IOException ; 87 88 89 92 void clearStorage() throws IOException ; 93 94 98 void savePersistentBuffer(int fileName, ByteBuffer byteBuffer) throws IOException ; 99 100 104 ByteBuffer getPersistentBuffer(int i); 105 108 public String getStorageName(); 109 110 111 String [] getAllServices(); 112 } 113 | Popular Tags |