es.rediris.papi.registry
Class FileRegistry

java.lang.Object
  extended by es.rediris.papi.registry.FileRegistry
All Implemented Interfaces:
Registry

public class FileRegistry
extends Object
implements Registry


Field Summary
(package private)  ObjectOutputStream oos
           
(package private)  Map<Object,byte[]> records
           
(package private)  File registry
           
 
Constructor Summary
FileRegistry(Config config)
           
 
Method Summary
 boolean clearRegistry()
           
 boolean closeRegistry()
           
 boolean deleteObject(int id)
           
 byte[] getObject(int id)
           
 boolean initRegistry()
           
 boolean saveObject(int id, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

records

Map<Object,byte[]> records

registry

File registry

oos

ObjectOutputStream oos
Constructor Detail

FileRegistry

public FileRegistry(Config config)
Method Detail

clearRegistry

public boolean clearRegistry()
Specified by:
clearRegistry in interface Registry

closeRegistry

public boolean closeRegistry()
Specified by:
closeRegistry in interface Registry

deleteObject

public boolean deleteObject(int id)
Specified by:
deleteObject in interface Registry

getObject

public byte[] getObject(int id)
Specified by:
getObject in interface Registry

initRegistry

public boolean initRegistry()
Specified by:
initRegistry in interface Registry

saveObject

public boolean saveObject(int id,
                          byte[] data)
Specified by:
saveObject in interface Registry