use of com.zimbra.cs.redolog.op.CreateVolume in project zm-mailbox by Zimbra.
the class VolumeManager method create.
public Volume create(Volume volume, boolean noRedo) throws ServiceException {
CreateVolume redoRecorder = null;
if (!noRedo) {
redoRecorder = new CreateVolume(volume);
redoRecorder.start(System.currentTimeMillis());
}
boolean success = false;
DbConnection conn = DbPool.getConnection();
try {
volume = DbVolume.create(conn, volume);
success = true;
if (!noRedo) {
redoRecorder.setId(volume.getId());
redoRecorder.log();
}
return volume;
} finally {
endTransaction(success, conn, redoRecorder);
if (success) {
synchronized (this) {
id2volume.put(volume.getId(), volume);
updateSweptDirectories();
}
}
}
}
Aggregations