public interface Repository
NTransaction
Modifier and Type | Method and Description |
---|---|
void |
backup(BackupFile backup)
Backups the repository (may be unimplemented).
|
void |
close()
Closes the repository.
|
void |
commit()
Commits all changes to the repository.
|
void |
delete(String dirName,
String name)
Deletes the corresponding objects in repository.
|
int |
getNbBadDeletedObjects()
Returns the number of useless delete operation on repository.
|
int |
getNbDeletedObjects()
Returns the number of delete operation on repository.
|
int |
getNbLoadedObjects()
Returns the number of load operation from repository.
|
int |
getNbSavedObjects()
Returns the number of save operation to repository.
|
void |
init(Transaction transaction,
File dir)
Initializes the repository.
|
String[] |
list(String prefix)
Gets a list of persistent objects that name corresponds to prefix.
|
byte[] |
load(String dirName,
String name)
Loads the byte array.
|
void |
save(String dirName,
String name,
byte[] content)
Save the corresponding bytes array.
|
void init(Transaction transaction, File dir) throws IOException
transaction
- the transaction object.dir
- the directory.IOException
- an error occurs.String[] list(String prefix) throws IOException
prefix
- the prefix.IOException
- an error occurs.void save(String dirName, String name, byte[] content) throws IOException
dirName
- the directory.name
- the object name.content
- the serialized object view.IOException
- an error occurs.byte[] load(String dirName, String name) throws IOException
dirName
- the directory.name
- the object name.IOException
- an error occurs.void delete(String dirName, String name) throws IOException
dirName
- the directory.name
- the object name.IOException
- an error occurs.void commit() throws IOException
IOException
- an error occurs.void backup(BackupFile backup) throws IOException
backup
- The backup file.IOException
void close() throws IOException
IOException
- an error occurs.int getNbSavedObjects()
int getNbDeletedObjects()
int getNbBadDeletedObjects()
int getNbLoadedObjects()
Copyright © 2023 ScalAgent D.T.. All rights reserved.