Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Sep 13, 2024
1 parent 1b75616 commit 6a5fa02
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static int getRecordingRegion(Connection conn, int coreID,
}

private static int getDownloadRegion(Connection conn, int coreID,
Region region) throws SQLException {
Region region) throws SQLException {
try (var s = conn.prepareStatement(GET_DOWNLOAD_REGION)) {
// core_id, local_region_index
setArguments(s, coreID, region.regionIndex);
Expand Down Expand Up @@ -211,8 +211,9 @@ private static byte[] read(ByteArrayInputStream chunk, int chunkLen)
return nb;
}

private int addRecordingData(Connection conn, int regionID, int extractionId,
int chunkLen, ByteArrayInputStream chunk) throws SQLException {
private int addRecordingData(Connection conn, int regionID,
int extractionId, int chunkLen,
ByteArrayInputStream chunk) throws SQLException {
try (var s = conn.prepareStatement(ADD_RECORDING_DATA)) {
// region_id, extraction_id, content, content_len,
setArguments(
Expand All @@ -227,7 +228,7 @@ private int addRecordingData(Connection conn, int regionID, int extractionId,
}

private int addDownloadData(Connection conn, int regionID, int extractionId,
int chunkLen, ByteArrayInputStream chunk) throws SQLException {
int chunkLen, ByteArrayInputStream chunk) throws SQLException {
try (var s = conn.prepareStatement(ADD_DOWNLOAD_DATA)) {
// region_id, extraction_id, content, content_len,
setArguments(
Expand Down Expand Up @@ -286,7 +287,7 @@ private void addRecordingContents(Connection conn, Region region,
}

private void addDownloadContents(Connection conn, Region region,
byte[] contents) throws SQLException {
byte[] contents) throws SQLException {
int coreID = getRecordingCore(conn, region.core);
int regionID = getDownloadRegion(conn, coreID, region);
int lastExtractionId = getLastExtractionId(conn);
Expand All @@ -299,7 +300,7 @@ private void addDownloadContents(Connection conn, Region region,

@Override
public byte[] getContents(Region region) throws StorageException {
if (region.isRecording){
if (region.isRecording) {
return callR(conn -> getRecordingContents(conn, region),
"retrieving a recording region");
} else {
Expand Down Expand Up @@ -329,8 +330,8 @@ private static byte[] getRecordingContents(Connection conn,
return accum.toByteArray();
}

private static byte[] getDownloadContents(Connection conn,
Region region) throws SQLException {
private static byte[] getDownloadContents(
Connection conn, Region region) throws SQLException {
var accum = new ByteArrayOutputStream();
try {
int coreID = getRecordingCore(conn, region.core);
Expand Down

0 comments on commit 6a5fa02

Please sign in to comment.