public final class ContainerBackupIndex extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BACKUP_INDEX_FILE_NAME
Dateiname unter dem der Index gespchert wird
|
static int |
MEDIUM_ID_UNKNOWN
Maximale MedienID unbekannt
|
static int |
MEDIUM_ID_UNSAVED
Datenidentifikation wurde noch nie gesichert
|
Modifier and Type | Method and Description |
---|---|
void |
appendContainerID(long containerID)
Fügt dem Index eine ContainerID hinzu
|
void |
close()
Schließt diesen ContainerBackupIndex.
|
static ContainerBackupIndex |
createNewContainerBackupIndex(File path)
Erstellt einen neuen, leeren ContainerBackupIndex im angegebenen Verzeichnis.
|
static boolean |
deleteContainerBackupIndex(File path)
Löscht den ContainerBackupIndex im angebenden Verzeichnis
|
static boolean |
existsIn(File path)
Prüft ob im angebenden Verzeichnis ein ContainerBackupIndex existiert
|
static boolean |
existsIn(String path)
Prüft ob im angebenden Verzeichnis ein ContainerBackupIndex existiert
|
protected void |
finalize() |
static ContainerBackupIndex |
getContainerBackupIndex(File path)
Gibt einen ContainerBackupIndex aus einem angegebenen Verzeichnis zurück
|
static ContainerBackupIndex |
getContainerBackupIndex(String path)
Gibt einen ContainerBackupIndex aus einem angegebenen Verzeichnis zurück
|
List<Long> |
getContainerIDs()
Gibt alle zu sichernden ContainerIDs im Index zurück
|
int |
getMaxMedienID()
Gibt die in der ContainerBackupIndex-Datei maximal gespeicherte MedienID zurück.
|
boolean |
removeContainerID(long containerID)
Entfernt eine ContainerID aus dem Index
|
boolean |
removeContainerID(long containerID,
int mediumID)
Entfernt eine ContainerID aus dem Index
|
void |
setMaxMedienID(int mediumID)
Setzt die MedienID auf einen festgelegten Wert (erlaubt auch das Zurücksetzen oder das Setzen von
MEDIUM_ID_UNSAVED bzw. |
String |
toString() |
public static final int MEDIUM_ID_UNKNOWN
public static final int MEDIUM_ID_UNSAVED
public static final String BACKUP_INDEX_FILE_NAME
public static ContainerBackupIndex getContainerBackupIndex(File path)
path
- Verzeichnispublic static ContainerBackupIndex getContainerBackupIndex(String path) throws IOException
path
- VerzeichnisIOException
- IO-Fehlerpublic static ContainerBackupIndex createNewContainerBackupIndex(File path) throws IOException
path
- VerzeichnisIOException
- IO-Fehlerpublic static boolean deleteContainerBackupIndex(File path)
path
- Verzeichnispublic static boolean existsIn(File path)
path
- Verzeichnispublic static boolean existsIn(String path)
path
- Verzeichnispublic List<Long> getContainerIDs() throws IOException
IOException
- IO-FehlerIllegalStateException
- Falls Index bereits geschlossen wurdepublic boolean removeContainerID(long containerID) throws IOException
containerID
- ContainerID die zu entfernen ist.IOException
- IO-FehlerIllegalStateException
- Falls Index bereits geschlossen wurdepublic boolean removeContainerID(long containerID, int mediumID) throws IOException
containerID
- ContainerID die zu entfernen ist.mediumID
- Beim sichern eines Containers kann eine MediumID mit angegeben werden, die dann im Index vermerkt wird. Wird nur berücksichtigt, wenn es
sich um eine positive Zahl handelt und nicht bereits eine größere MedienID in der Datei vorhanden istIOException
- IO-FehlerIllegalStateException
- Falls Index bereits geschlossen wurdepublic void appendContainerID(long containerID) throws IOException
containerID
- ContainerID die einzufügen istIOException
- IO-FehlerIllegalStateException
- Falls Index bereits geschlossen wurdepublic int getMaxMedienID() throws IOException
IOException
- IO-Fehlerpublic void setMaxMedienID(int mediumID) throws IOException
MEDIUM_ID_UNSAVED
bzw. MEDIUM_ID_UNKNOWN
mediumID
- MedienIDIOException
- IO-Fehlerpublic void close()
protected void finalize() throws Throwable