use of org.exist.storage.journal.LogException in project exist by eXist-db.
the class BlobStoreImpl method redo.
@Override
public void redo(final BlobLoggable blobLoggable) throws LogException {
try {
if (blobLoggable instanceof StoreBlobFileLoggable) {
final StoreBlobFileLoggable storeBlobFileLoggable = (StoreBlobFileLoggable) blobLoggable;
redoStoreBlobFile(storeBlobFileLoggable.getBlobId(), storeBlobFileLoggable.getStagedUuid());
} else if (blobLoggable instanceof UpdateBlobRefCountLoggable) {
final UpdateBlobRefCountLoggable updateBlobRefCountLoggable = (UpdateBlobRefCountLoggable) blobLoggable;
updateBlogRefCount(updateBlobRefCountLoggable.getBlobId(), updateBlobRefCountLoggable.getNewCount());
}
} catch (final IOException e) {
throw new LogException(e.getMessage(), e);
}
}
use of org.exist.storage.journal.LogException in project exist by eXist-db.
the class BlobStoreImpl method undo.
@Override
public void undo(final BlobLoggable blobLoggable) throws LogException {
try {
if (blobLoggable instanceof StoreBlobFileLoggable) {
final StoreBlobFileLoggable storeBlobFileLoggable = (StoreBlobFileLoggable) blobLoggable;
undoStoreBlobFile(storeBlobFileLoggable.getBlobId(), storeBlobFileLoggable.getStagedUuid());
} else if (blobLoggable instanceof UpdateBlobRefCountLoggable) {
final UpdateBlobRefCountLoggable updateBlobRefCountLoggable = (UpdateBlobRefCountLoggable) blobLoggable;
updateBlogRefCount(updateBlobRefCountLoggable.getBlobId(), updateBlobRefCountLoggable.getCurrentCount());
}
} catch (final IOException e) {
throw new LogException(e.getMessage(), e);
}
}
Aggregations