From 678d527eb71763a9c5f9c313e660ea0b43786276 Mon Sep 17 00:00:00 2001 From: Matt Peterson Date: Wed, 26 Jun 2024 07:29:55 -0600 Subject: [PATCH] fixed: java file license headers Signed-off-by: Matt Peterson --- .../block/server/BlockStreamService.java | 19 +++++++++---------- .../com/hedera/block/server/Constants.java | 5 +++-- .../java/com/hedera/block/server/Server.java | 2 -- .../server/consumer/LiveStreamObserver.java | 2 -- .../consumer/LiveStreamObserverImpl.java | 9 ++++----- .../mediator/LiveStreamMediatorImpl.java | 8 +++----- .../block/server/mediator/StreamMediator.java | 2 -- .../persistence/BlockPersistenceHandler.java | 2 -- .../persistence/WriteThroughCacheHandler.java | 2 -- .../persistence/cache/BNLinkedHashMap.java | 2 -- .../server/persistence/cache/BlockCache.java | 2 -- .../server/persistence/cache/LRUCache.java | 2 -- .../persistence/storage/BlockStorage.java | 2 -- .../storage/FileSystemBlockStorage.java | 2 -- .../producer/ProducerBlockStreamObserver.java | 2 -- .../server/persistence/PersistTestUtils.java | 16 ++++++++++++++++ .../block/server/persistence/RangeTest.java | 2 -- .../WriteThroughCacheHandlerTest.java | 2 -- .../hedera/block/server/util/TestUtils.java | 3 --- 19 files changed, 35 insertions(+), 51 deletions(-) diff --git a/server/src/main/java/com/hedera/block/server/BlockStreamService.java b/server/src/main/java/com/hedera/block/server/BlockStreamService.java index eca60b876..5f7203a8e 100644 --- a/server/src/main/java/com/hedera/block/server/BlockStreamService.java +++ b/server/src/main/java/com/hedera/block/server/BlockStreamService.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -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 */ @@ -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 streamSink( final StreamObserver responseStreamObserver) { @@ -106,11 +105,11 @@ private StreamObserver 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 streamSource(final StreamObserver responseStreamObserver) { LOGGER.log(System.Logger.Level.DEBUG, "Executing bidirectional streamSource method"); diff --git a/server/src/main/java/com/hedera/block/server/Constants.java b/server/src/main/java/com/hedera/block/server/Constants.java index 4a4371e2d..927caa4ee 100644 --- a/server/src/main/java/com/hedera/block/server/Constants.java +++ b/server/src/main/java/com/hedera/block/server/Constants.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,6 +16,9 @@ package com.hedera.block.server; +/** + * Constants used in the BlockNode service. + */ public final class Constants { private Constants() {} diff --git a/server/src/main/java/com/hedera/block/server/Server.java b/server/src/main/java/com/hedera/block/server/Server.java index 74d5ed77d..ad7d4da2e 100644 --- a/server/src/main/java/com/hedera/block/server/Server.java +++ b/server/src/main/java/com/hedera/block/server/Server.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserver.java b/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserver.java index e266d0060..59e77726c 100644 --- a/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserver.java +++ b/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserver.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserverImpl.java b/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserverImpl.java index 241c33055..e3b765322 100644 --- a/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserverImpl.java +++ b/server/src/main/java/com/hedera/block/server/consumer/LiveStreamObserverImpl.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -45,7 +43,8 @@ public class LiveStreamObserverImpl implements LiveStreamObserver mediator, final StreamObserver responseStreamObserver) { @@ -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) { diff --git a/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java b/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java index 87f754f64..28605c8c6 100644 --- a/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java +++ b/server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -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 { diff --git a/server/src/main/java/com/hedera/block/server/mediator/StreamMediator.java b/server/src/main/java/com/hedera/block/server/mediator/StreamMediator.java index 32b4de9c0..cd6b68063 100644 --- a/server/src/main/java/com/hedera/block/server/mediator/StreamMediator.java +++ b/server/src/main/java/com/hedera/block/server/mediator/StreamMediator.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/BlockPersistenceHandler.java b/server/src/main/java/com/hedera/block/server/persistence/BlockPersistenceHandler.java index 5a7153b14..e4768d7fe 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/BlockPersistenceHandler.java +++ b/server/src/main/java/com/hedera/block/server/persistence/BlockPersistenceHandler.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/WriteThroughCacheHandler.java b/server/src/main/java/com/hedera/block/server/persistence/WriteThroughCacheHandler.java index 3e4ecf674..da26b9181 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/WriteThroughCacheHandler.java +++ b/server/src/main/java/com/hedera/block/server/persistence/WriteThroughCacheHandler.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/cache/BNLinkedHashMap.java b/server/src/main/java/com/hedera/block/server/persistence/cache/BNLinkedHashMap.java index 68795b743..c05c82420 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/cache/BNLinkedHashMap.java +++ b/server/src/main/java/com/hedera/block/server/persistence/cache/BNLinkedHashMap.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/cache/BlockCache.java b/server/src/main/java/com/hedera/block/server/persistence/cache/BlockCache.java index 02d0833ae..67f017562 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/cache/BlockCache.java +++ b/server/src/main/java/com/hedera/block/server/persistence/cache/BlockCache.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/cache/LRUCache.java b/server/src/main/java/com/hedera/block/server/persistence/cache/LRUCache.java index 81e933619..486a5af89 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/cache/LRUCache.java +++ b/server/src/main/java/com/hedera/block/server/persistence/cache/LRUCache.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/storage/BlockStorage.java b/server/src/main/java/com/hedera/block/server/persistence/storage/BlockStorage.java index 133a3dd2b..7f42807d7 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/storage/BlockStorage.java +++ b/server/src/main/java/com/hedera/block/server/persistence/storage/BlockStorage.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/persistence/storage/FileSystemBlockStorage.java b/server/src/main/java/com/hedera/block/server/persistence/storage/FileSystemBlockStorage.java index fae43b010..83e29ecc1 100644 --- a/server/src/main/java/com/hedera/block/server/persistence/storage/FileSystemBlockStorage.java +++ b/server/src/main/java/com/hedera/block/server/persistence/storage/FileSystemBlockStorage.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/main/java/com/hedera/block/server/producer/ProducerBlockStreamObserver.java b/server/src/main/java/com/hedera/block/server/producer/ProducerBlockStreamObserver.java index 8a35cf41f..d789ae68a 100644 --- a/server/src/main/java/com/hedera/block/server/producer/ProducerBlockStreamObserver.java +++ b/server/src/main/java/com/hedera/block/server/producer/ProducerBlockStreamObserver.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/test/java/com/hedera/block/server/persistence/PersistTestUtils.java b/server/src/test/java/com/hedera/block/server/persistence/PersistTestUtils.java index 4c9032feb..87e1e83b5 100644 --- a/server/src/test/java/com/hedera/block/server/persistence/PersistTestUtils.java +++ b/server/src/test/java/com/hedera/block/server/persistence/PersistTestUtils.java @@ -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; diff --git a/server/src/test/java/com/hedera/block/server/persistence/RangeTest.java b/server/src/test/java/com/hedera/block/server/persistence/RangeTest.java index eada4cb5f..79a06d73e 100644 --- a/server/src/test/java/com/hedera/block/server/persistence/RangeTest.java +++ b/server/src/test/java/com/hedera/block/server/persistence/RangeTest.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/test/java/com/hedera/block/server/persistence/WriteThroughCacheHandlerTest.java b/server/src/test/java/com/hedera/block/server/persistence/WriteThroughCacheHandlerTest.java index 6d94ec950..30e0f57b0 100644 --- a/server/src/test/java/com/hedera/block/server/persistence/WriteThroughCacheHandlerTest.java +++ b/server/src/test/java/com/hedera/block/server/persistence/WriteThroughCacheHandlerTest.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/server/src/test/java/com/hedera/block/server/util/TestUtils.java b/server/src/test/java/com/hedera/block/server/util/TestUtils.java index 4deadefc0..20f73b2e1 100644 --- a/server/src/test/java/com/hedera/block/server/util/TestUtils.java +++ b/server/src/test/java/com/hedera/block/server/util/TestUtils.java @@ -1,6 +1,4 @@ /* - * Hedera Block Node - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,7 +21,6 @@ public final class TestUtils { private TestUtils() {} - public static void deleteDirectory(File directoryToBeDeleted) { File[] allContents = directoryToBeDeleted.listFiles(); if (allContents != null) {