Skip to content

Commit

Permalink
fixed: java file license headers
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Peterson <[email protected]>
  • Loading branch information
mattp-swirldslabs committed Jun 26, 2024
1 parent 2f51579 commit 678d527
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -68,7 +66,8 @@ public Descriptors.FileDescriptor proto() {
}

/**
* Returns the service name for the BlockStreamService. This service name corresponds to the service name in the proto file.
* Returns the service name for the BlockStreamService. This service name corresponds to the service name in
* the proto file.
*
* @return the service name
*/
Expand All @@ -91,10 +90,10 @@ public void update(final Routing routing) {
/**
* The streamSink method is called by Helidon each time a producer initiates a bidirectional stream.
*
* @param responseStreamObserver - Helidon provides a StreamObserver to handle responses back to the producer.
* @param responseStreamObserver Helidon provides a StreamObserver to handle responses back to the producer.
*
* @return a custom StreamObserver to handle streaming blocks from the producer to all subscribed consumers
* via the streamMediator as well as sending responses back to the producer.
* @return a custom StreamObserver to handle streaming blocks from the producer to all subscribed consumer
* via the streamMediator as well as sending responses back to the producer.
*/
private StreamObserver<BlockStreamServiceGrpcProto.Block> streamSink(
final StreamObserver<BlockStreamServiceGrpcProto.BlockResponse> responseStreamObserver) {
Expand All @@ -106,11 +105,11 @@ private StreamObserver<BlockStreamServiceGrpcProto.Block> streamSink(
/**
* The streamSource method is called by Helidon each time a consumer initiates a bidirectional stream.
*
* @param responseStreamObserver - Helidon provides a StreamObserver to handle responses from the consumer
* back to the server.
* @param responseStreamObserver Helidon provides a StreamObserver to handle responses from the consumer
* back to the server.
*
* @return a custom StreamObserver to handle streaming blocks from the producer to the consumer as well as
* handling responses from the consumer.
* @return a custom StreamObserver to handle streaming blocks from the producer to the consumer as well
* as handling responses from the consumer.
*/
private StreamObserver<BlockStreamServiceGrpcProto.BlockResponse> streamSource(final StreamObserver<BlockStreamServiceGrpcProto.Block> responseStreamObserver) {
LOGGER.log(System.Logger.Level.DEBUG, "Executing bidirectional streamSource method");
Expand Down
5 changes: 3 additions & 2 deletions server/src/main/java/com/hedera/block/server/Constants.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -18,6 +16,9 @@

package com.hedera.block.server;

/**
* Constants used in the BlockNode service.
*/
public final class Constants {
private Constants() {}

Expand Down
2 changes: 0 additions & 2 deletions server/src/main/java/com/hedera/block/server/Server.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -45,7 +43,8 @@ public class LiveStreamObserverImpl implements LiveStreamObserver<BlockStreamSer
* @param responseStreamObserver the response stream observer
*
*/
public LiveStreamObserverImpl(final long timeoutThresholdMillis,
public LiveStreamObserverImpl(
final long timeoutThresholdMillis,
final StreamMediator<BlockStreamServiceGrpcProto.Block, BlockStreamServiceGrpcProto.BlockResponse> mediator,
final StreamObserver<BlockStreamServiceGrpcProto.Block> responseStreamObserver) {

Expand Down Expand Up @@ -77,9 +76,9 @@ public void notify(final BlockStreamServiceGrpcProto.Block block) {
}

/**
* The onNext() method is triggered by Helidon when the consumer sends a blockResponse via the bidirectional stream.
* The onNext() method is triggered by Helidon when a consumer sends a blockResponse via the bidirectional stream.
*
* @param blockResponse - the BlockResponse passed to the server via the bidirectional stream to the downstream consumer
* @param blockResponse the BlockResponse passed back to the server via the bidirectional stream to the downstream consumer.
*/
@Override
public void onNext(final BlockStreamServiceGrpcProto.BlockResponse blockResponse) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -27,9 +25,9 @@
import java.util.Set;

/**
* LiveStreamMediatorImpl is the implementation of the StreamMediator interface. It is responsible for managing
* the subscription and unsubscription operations of downstream consumers. It also proxies new blocks
* to the subscribers as they arrive and persists the blocks to the block persistence store.
* LiveStreamMediatorImpl is the implementation of the StreamMediator interface. It is responsible for
* managing the subscribe and unsubscribe operations of downstream consumers. It also proxies live
* blocks to the subscribers as they arrive and persists the blocks to the block persistence store.
*/
public class LiveStreamMediatorImpl implements StreamMediator<BlockStreamServiceGrpcProto.Block, BlockStreamServiceGrpcProto.BlockResponse> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.hedera.block.server.persistence;

import com.hedera.block.protos.BlockStreamServiceGrpcProto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* Hedera Block Node
*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -23,7 +21,6 @@
public final class TestUtils {
private TestUtils() {}


public static void deleteDirectory(File directoryToBeDeleted) {
File[] allContents = directoryToBeDeleted.listFiles();
if (allContents != null) {
Expand Down

0 comments on commit 678d527

Please sign in to comment.