Skip to content

Commit c1a92fd

Browse files
fix: rename impl class
Signed-off-by: Matt Peterson <[email protected]>
1 parent 0324785 commit c1a92fd

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

server/src/main/java/com/hedera/block/server/Server.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static com.hedera.block.server.Constants.*;
2121

2222
import com.hedera.block.server.mediator.LiveStreamMediatorImpl;
23-
import com.hedera.block.server.persistence.WriteThroughCacheHandler;
23+
import com.hedera.block.server.persistence.FileSystemPersistenceHandler;
2424
import com.hedera.block.server.persistence.storage.*;
2525
import com.hedera.block.server.producer.ItemAckBuilder;
2626
import io.grpc.stub.ServerCalls;
@@ -77,7 +77,7 @@ public static void main(final String[] args) {
7777
consumerTimeoutThreshold,
7878
new ItemAckBuilder(),
7979
new LiveStreamMediatorImpl(
80-
new WriteThroughCacheHandler(blockReader, blockWriter),
80+
new FileSystemPersistenceHandler(blockReader, blockWriter),
8181
(streamMediator) -> {
8282
LOGGER.log(
8383
System.Logger.Level.ERROR,

server/src/main/java/com/hedera/block/server/persistence/FileSystemPersistenceHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
* Write-Through cache handler coordinates between the block storage and the block cache to ensure
3131
* the block is persisted to the storage before being cached.
3232
*/
33-
public class WriteThroughCacheHandler implements BlockPersistenceHandler<BlockItem, Block> {
33+
public class FileSystemPersistenceHandler implements BlockPersistenceHandler<BlockItem, Block> {
3434

3535
private final BlockReader<Block> blockReader;
3636
private final BlockWriter<BlockItem> blockWriter;
3737

3838
/** Constructor for the WriteThroughCacheHandler class. */
39-
public WriteThroughCacheHandler(
39+
public FileSystemPersistenceHandler(
4040
final BlockReader<Block> blockReader, final BlockWriter<BlockItem> blockWriter) {
4141
this.blockReader = blockReader;
4242
this.blockWriter = blockWriter;

server/src/test/java/com/hedera/block/server/BlockStreamServiceIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.hedera.block.server.data.ObjectEvent;
2727
import com.hedera.block.server.mediator.LiveStreamMediatorImpl;
2828
import com.hedera.block.server.mediator.StreamMediator;
29-
import com.hedera.block.server.persistence.WriteThroughCacheHandler;
29+
import com.hedera.block.server.persistence.FileSystemPersistenceHandler;
3030
import com.hedera.block.server.persistence.storage.BlockAsDirReader;
3131
import com.hedera.block.server.persistence.storage.BlockAsDirWriter;
3232
import com.hedera.block.server.persistence.storage.BlockReader;
@@ -147,7 +147,7 @@ public void testSubscribeBlockStream() throws InterruptedException {
147147
final var streamMediator =
148148
new LiveStreamMediatorImpl(
149149
new HashMap<>(),
150-
new WriteThroughCacheHandler(blockReader, blockWriter),
150+
new FileSystemPersistenceHandler(blockReader, blockWriter),
151151
testCallback);
152152

153153
// Build the BlockStreamService
@@ -426,7 +426,7 @@ private StreamMediator<ObjectEvent<BlockItem>, BlockItem> buildStreamMediator(
426426
final BlockReader<Block> blockReader = new BlockAsDirReader(JUNIT, testConfig);
427427
final BlockWriter<BlockItem> blockWriter = new BlockAsDirWriter(JUNIT, testConfig);
428428
return new LiveStreamMediatorImpl(
429-
subscribers, new WriteThroughCacheHandler(blockReader, blockWriter), testCallback);
429+
subscribers, new FileSystemPersistenceHandler(blockReader, blockWriter), testCallback);
430430
}
431431

432432
private StreamMediator<ObjectEvent<BlockItem>, BlockItem> buildStreamMediator()

server/src/test/java/com/hedera/block/server/mediator/LiveStreamMediatorImplTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import com.hedera.block.server.consumer.ConsumerBlockItemObserver;
2727
import com.hedera.block.server.data.ObjectEvent;
2828
import com.hedera.block.server.persistence.BlockPersistenceHandler;
29-
import com.hedera.block.server.persistence.WriteThroughCacheHandler;
29+
import com.hedera.block.server.persistence.FileSystemPersistenceHandler;
3030
import com.hedera.block.server.persistence.storage.BlockReader;
3131
import com.hedera.block.server.persistence.storage.BlockWriter;
3232
import io.grpc.stub.StreamObserver;
@@ -61,7 +61,7 @@ public void testUnsubscribeEach() {
6161

6262
final var streamMediator =
6363
new LiveStreamMediatorImpl(
64-
new WriteThroughCacheHandler(blockReader, blockWriter), testCallback);
64+
new FileSystemPersistenceHandler(blockReader, blockWriter), testCallback);
6565

6666
// Set up the subscribers
6767
streamMediator.subscribe(observer1);
@@ -99,7 +99,7 @@ public void testMediatorPersistenceWithoutSubscribers() throws IOException {
9999

100100
final var streamMediator =
101101
new LiveStreamMediatorImpl(
102-
new WriteThroughCacheHandler(blockReader, blockWriter), testCallback);
102+
new FileSystemPersistenceHandler(blockReader, blockWriter), testCallback);
103103

104104
final BlockItem blockItem = BlockItem.newBuilder().build();
105105

@@ -118,7 +118,7 @@ public void testMediatorPublishEventToSubscribers() throws IOException, Interrup
118118
final long TEST_TIME = 1_719_427_664_950L;
119119
final var streamMediator =
120120
new LiveStreamMediatorImpl(
121-
new WriteThroughCacheHandler(blockReader, blockWriter), testCallback);
121+
new FileSystemPersistenceHandler(blockReader, blockWriter), testCallback);
122122

123123
final var concreteObserver1 =
124124
new ConsumerBlockItemObserver(
@@ -200,7 +200,7 @@ public void testSubAndUnsubHandling() {
200200
final long TEST_TIME = 1_719_427_664_950L;
201201
final var streamMediator =
202202
new LiveStreamMediatorImpl(
203-
new WriteThroughCacheHandler(blockReader, blockWriter), testCallback);
203+
new FileSystemPersistenceHandler(blockReader, blockWriter), testCallback);
204204

205205
final var concreteObserver1 =
206206
new ConsumerBlockItemObserver(

server/src/test/java/com/hedera/block/server/persistence/FileSystemPersistenceHandlerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import org.junit.jupiter.api.BeforeEach;
4141
import org.junit.jupiter.api.Test;
4242

43-
public class WriteThroughCacheHandlerTest {
43+
public class FileSystemPersistenceHandlerTest {
4444

4545
private final System.Logger LOGGER = System.getLogger(getClass().getName());
4646

@@ -73,7 +73,7 @@ public void testMaxEntriesGreaterThanBlocks() throws IOException {
7373
BlockReader<Block> blockReader = new BlockAsDirReader(JUNIT, testConfig);
7474
BlockWriter<BlockItem> blockWriter = new BlockAsDirWriter(JUNIT, testConfig);
7575
BlockPersistenceHandler<BlockItem, Block> blockPersistenceHandler =
76-
new WriteThroughCacheHandler(blockReader, blockWriter);
76+
new FileSystemPersistenceHandler(blockReader, blockWriter);
7777

7878
List<BlockItem> blockItems = generateBlockItems(numOfBlocks);
7979
persistBlockItems(blockItems, blockPersistenceHandler);

server/src/test/java/com/hedera/block/server/persistence/RangeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private static void verifyReadRange(
101101

102102
// Mock up a simple, in-memory persistence handler
103103
NoOpTestBlockStorage noOpTestBlockStorage = new NoOpTestBlockStorage();
104-
return new WriteThroughCacheHandler(noOpTestBlockStorage, noOpTestBlockStorage);
104+
return new FileSystemPersistenceHandler(noOpTestBlockStorage, noOpTestBlockStorage);
105105
}
106106

107107
private static class NoOpTestBlockStorage

server/src/test/java/com/hedera/block/server/producer/ProducerBlockItemObserverTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import com.hedera.block.server.data.ObjectEvent;
3131
import com.hedera.block.server.mediator.LiveStreamMediatorImpl;
3232
import com.hedera.block.server.mediator.StreamMediator;
33-
import com.hedera.block.server.persistence.WriteThroughCacheHandler;
33+
import com.hedera.block.server.persistence.FileSystemPersistenceHandler;
3434
import com.hedera.block.server.persistence.storage.BlockReader;
3535
import com.hedera.block.server.persistence.storage.BlockWriter;
3636
import io.grpc.stub.StreamObserver;
@@ -103,7 +103,7 @@ public void testProducerToManyConsumers() throws IOException, InterruptedExcepti
103103
final long TEST_TIME = 1_719_427_664_950L;
104104
final var streamMediator =
105105
new LiveStreamMediatorImpl(
106-
new WriteThroughCacheHandler(blockReader, blockWriter), testCallback);
106+
new FileSystemPersistenceHandler(blockReader, blockWriter), testCallback);
107107

108108
final var concreteObserver1 =
109109
new ConsumerBlockItemObserver(

0 commit comments

Comments
 (0)