Skip to content

Commit

Permalink
fix: removed unnecessary interface
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Peterson <[email protected]>
  • Loading branch information
mattp-swirldslabs committed Aug 11, 2024
1 parent dd1c67b commit b2e4cde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class LiveStreamMediatorBuilder
implements StreamMediatorBuilder<BlockItem, SubscribeStreamResponse> {
public class LiveStreamMediatorBuilder {

private final BlockWriter<BlockItem> blockWriter;
private ServiceStatus serviceStatus;
Expand All @@ -53,23 +52,20 @@ private LiveStreamMediatorBuilder(
}

@NonNull
public static StreamMediatorBuilder<BlockItem, SubscribeStreamResponse> newBuilder(
public static LiveStreamMediatorBuilder newBuilder(
@NonNull final BlockWriter<BlockItem> blockWriter,
@NonNull final BlockNodeContext blockNodeContext) {
return new LiveStreamMediatorBuilder(blockWriter, blockNodeContext);
}

@NonNull
@Override
public StreamMediatorBuilder<BlockItem, SubscribeStreamResponse> serviceStatus(
@NonNull final ServiceStatus serviceStatus) {
public LiveStreamMediatorBuilder serviceStatus(@NonNull final ServiceStatus serviceStatus) {
this.serviceStatus = serviceStatus;
return this;
}

@NonNull
@Override
public StreamMediatorBuilder<BlockItem, SubscribeStreamResponse> subscribers(
public LiveStreamMediatorBuilder subscribers(
@NonNull
final Map<
EventHandler<ObjectEvent<SubscribeStreamResponse>>,
Expand All @@ -80,7 +76,6 @@ public StreamMediatorBuilder<BlockItem, SubscribeStreamResponse> subscribers(
}

@NonNull
@Override
public StreamMediator<BlockItem, ObjectEvent<SubscribeStreamResponse>> build() {
return new LiveStreamMediatorImpl(
subscribers, blockWriter, serviceStatus, blockNodeContext);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ private BlockStreamService buildBlockStreamService() throws IOException {
final var streamMediator =
buildStreamMediator(new ConcurrentHashMap<>(32), Util.defaultPerms);

// Build the BlockStreamService
return buildBlockStreamService(streamMediator, blockReader, serviceStatus);
}

Expand Down

0 comments on commit b2e4cde

Please sign in to comment.