mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-08 23:17:54 -05:00
build: Add default constructor and javadoc for metrics, nat, pki, plugins, services, testutil, util (#7071)
Signed-off-by: Usman Saleem <usman@usmans.info>
This commit is contained in:
@@ -25,6 +25,9 @@ public class MetricCategoryRegistryImpl implements MetricCategoryRegistry {
|
||||
|
||||
private final List<MetricCategory> metricCategories = new ArrayList<>();
|
||||
|
||||
/** Default constructor */
|
||||
public MetricCategoryRegistryImpl() {}
|
||||
|
||||
/**
|
||||
* Gets metric categories.
|
||||
*
|
||||
|
||||
@@ -24,6 +24,9 @@ import dagger.Provides;
|
||||
/** Dagger module for providing the {@link MetricsConfiguration} instance. */
|
||||
@Module
|
||||
public class MetricsConfigurationModule {
|
||||
/** Default constructor */
|
||||
public MetricsConfigurationModule() {}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
MetricsConfiguration provideMetricsConfiguration() {
|
||||
|
||||
@@ -28,6 +28,8 @@ import dagger.Provides;
|
||||
*/
|
||||
@Module
|
||||
public class MetricsSystemModule {
|
||||
/** Default constructor */
|
||||
public MetricsSystemModule() {}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
|
||||
@@ -73,6 +73,9 @@ public class NoOpMetricsSystem implements ObservableMetricsSystem {
|
||||
public static final LabelledGauge NO_OP_LABELLED_3_GAUGE =
|
||||
new LabelledGaugeNoOpMetric(3, NO_OP_GAUGE);
|
||||
|
||||
/** Default constructor */
|
||||
public NoOpMetricsSystem() {}
|
||||
|
||||
@Override
|
||||
public LabelledMetric<Counter> createLabelledCounter(
|
||||
final MetricCategory category,
|
||||
|
||||
@@ -24,6 +24,9 @@ import java.util.function.DoubleSupplier;
|
||||
public class NoOpValueCollector implements LabelledGauge {
|
||||
private final List<String> labelValuesCreated = new ArrayList<>();
|
||||
|
||||
/** Default constructor */
|
||||
public NoOpValueCollector() {}
|
||||
|
||||
@Override
|
||||
public synchronized void labels(final DoubleSupplier valueSupplier, final String... labelValues) {
|
||||
final String labelValuesString = String.join(",", labelValues);
|
||||
|
||||
@@ -164,6 +164,9 @@ public class RocksDBStats {
|
||||
HistogramType.READ_NUM_MERGE_OPERANDS,
|
||||
};
|
||||
|
||||
/** Default constructor */
|
||||
private RocksDBStats() {}
|
||||
|
||||
/**
|
||||
* Register rocks db metrics.
|
||||
*
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.stream.Stream;
|
||||
|
||||
/** The Docker detector. */
|
||||
public class DockerDetector implements NatMethodDetector {
|
||||
/** Default constructor */
|
||||
public DockerDetector() {}
|
||||
|
||||
@Override
|
||||
public Optional<NatMethod> detect() {
|
||||
|
||||
@@ -25,6 +25,9 @@ public class HostBasedIpDetector implements IpDetector {
|
||||
|
||||
private static final String HOSTNAME = "HOST_IP";
|
||||
|
||||
/** Default constructor */
|
||||
public HostBasedIpDetector() {}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("AddressSelection")
|
||||
public Optional<String> detectAdvertisedIp() {
|
||||
|
||||
@@ -32,6 +32,9 @@ public class KubernetesDetector implements NatMethodDetector {
|
||||
Optional.ofNullable(System.getenv("KUBERNETES_SERVICE_HOST"));
|
||||
private static final Path KUBERNETES_WATERMARK_FILE = Paths.get("var/run/secrets/kubernetes.io");
|
||||
|
||||
/** Default constructor */
|
||||
public KubernetesDetector() {}
|
||||
|
||||
@Override
|
||||
public Optional<NatMethod> detect() {
|
||||
return KUBERNETES_SERVICE_HOST
|
||||
|
||||
@@ -27,6 +27,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
/** The CRL util. */
|
||||
public class CRLUtil {
|
||||
/** Default constructor */
|
||||
private CRLUtil() {}
|
||||
|
||||
/**
|
||||
* Load CRLs cert store.
|
||||
|
||||
@@ -31,6 +31,9 @@ public class RocksDBConfigurationBuilder {
|
||||
private int backgroundThreadCount = DEFAULT_BACKGROUND_THREAD_COUNT;
|
||||
private boolean isHighSpec = DEFAULT_IS_HIGH_SPEC;
|
||||
|
||||
/** Instantiates a new Rocks db configuration builder. */
|
||||
public RocksDBConfigurationBuilder() {}
|
||||
|
||||
/**
|
||||
* Database dir.
|
||||
*
|
||||
|
||||
@@ -40,6 +40,9 @@ public class InMemoryStoragePlugin implements BesuPlugin {
|
||||
private InMemoryKeyValueStorageFactory factory;
|
||||
private InMemoryKeyValueStorageFactory privacyFactory;
|
||||
|
||||
/** Default constructor */
|
||||
public InMemoryStoragePlugin() {}
|
||||
|
||||
@Override
|
||||
public void register(final BesuContext context) {
|
||||
LOG.debug("Registering plugin");
|
||||
|
||||
@@ -290,6 +290,9 @@ public class SegmentedInMemoryKeyValueStorage
|
||||
/** protected access to deletedValues set for the transaction. */
|
||||
protected Map<SegmentIdentifier, Set<Bytes>> removedKeys = new HashMap<>();
|
||||
|
||||
/** Default constructor */
|
||||
public SegmentedInMemoryTransaction() {}
|
||||
|
||||
@Override
|
||||
public void put(
|
||||
final SegmentIdentifier segmentIdentifier, final byte[] key, final byte[] value) {
|
||||
|
||||
@@ -40,6 +40,8 @@ import org.junit.jupiter.api.Test;
|
||||
/** The Abstract key value storage test. */
|
||||
@Disabled
|
||||
public abstract class AbstractKeyValueStorageTest {
|
||||
/** Default Constructor */
|
||||
protected AbstractKeyValueStorageTest() {}
|
||||
|
||||
/**
|
||||
* Create store key value storage.
|
||||
|
||||
@@ -36,6 +36,14 @@ public class MockExecutorService implements ExecutorService {
|
||||
|
||||
private final List<ExecutorTask<?>> tasks = new ArrayList<>();
|
||||
|
||||
/** Default constructor */
|
||||
public MockExecutorService() {}
|
||||
|
||||
/**
|
||||
* Gets tasks.
|
||||
*
|
||||
* @return the tasks
|
||||
*/
|
||||
/**
|
||||
* Gets futures.
|
||||
*
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.concurrent.TimeoutException;
|
||||
|
||||
/** The mock scheduled executor */
|
||||
public class MockScheduledExecutor extends MockExecutorService implements ScheduledExecutorService {
|
||||
/** Default constructor */
|
||||
public MockScheduledExecutor() {}
|
||||
|
||||
@Override
|
||||
public ScheduledFuture<?> schedule(
|
||||
|
||||
@@ -34,6 +34,9 @@ import org.slf4j.LoggerFactory;
|
||||
public class EnclaveKeyUtils {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(EnclaveKeyUtils.class);
|
||||
|
||||
/** Default constructor */
|
||||
private EnclaveKeyUtils() {}
|
||||
|
||||
/**
|
||||
* Utility method to load the enclave public key. Possible input values are the names of the *.pub
|
||||
* files in the resources folder.
|
||||
|
||||
@@ -30,6 +30,9 @@ import org.testcontainers.containers.Network;
|
||||
public class TesseraTestHarnessFactory {
|
||||
private static final String storage = "memory";
|
||||
|
||||
/** Default constructor */
|
||||
private TesseraTestHarnessFactory() {}
|
||||
|
||||
/**
|
||||
* Create tessera test harness.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user