diff --git a/.github/workflows/maven-multi-os.yml b/.github/workflows/maven-multi-os.yml new file mode 100644 index 0000000..409bbe0 --- /dev/null +++ b/.github/workflows/maven-multi-os.yml @@ -0,0 +1,42 @@ +name: Compile, Validate and Package BKP-LHC-Client on Multiple OS + +on: + push: + branches: [ main ] + pull_request: + +jobs: + compile: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - name: Checkout code + uses: actions/checkout@v5 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + - name: Compile with Maven + run: | + if [[ "${{ runner.os }}" == "Linux" ]]; then + mvn clean compile -Dos.version=linux-x86_64 + elif [[ "${{ runner.os }}" == "macOS" ]]; then + mvn clean compile -Dos.version=osx-x86_64 + fi + - name: Validate Maven Project + run: | + if [[ "${{ runner.os }}" == "Linux" ]]; then + mvn validate -Dos.version=linux-x86_64 + elif [[ "${{ runner.os }}" == "macOS" ]]; then + mvn validate -Dos.version=osx-x86_64 + fi + - name: Package with Maven (Fat JAR) + run: | + if [[ "${{ runner.os }}" == "Linux" ]]; then + mvn clean package -Dos.version=linux-x86_64 + elif [[ "${{ runner.os }}" == "macOS" ]]; then + mvn clean package -Dos.version=osx-x86_64 + fi diff --git a/.gitignore b/.gitignore index d0edbb6..9de336e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,17 @@ -bin -AliDip2BK.jar -.idea -STATE -AliDip2BK.iml -RunsHistory -out/ \ No newline at end of file +## Maven build output +target/ + +## IDE files +.idea/ +.vscode/ +*.iml +.classpath +.project +.settings/ + +## OS files +.DS_Store +Thumbs.db + +## Protobuf generated sources (if not needed in VCS) +bin \ No newline at end of file diff --git a/README.md b/README.md index 7463d1d..9d107e9 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,18 @@ -# AliDip2BK +# BKP-LHC-Client -Initial Repository based on work from @iclegrand in repository: https://github.com/iclegrand/AliDip2BK +Repository based on work from @iclegrand in repository: https://github.com/iclegrand/AliDip2BK -Collect selected Info from the CERN DIP system (LHC & ALICE -DCS) and publish them into the Bookkeeping/InfoLogger systems - -A detailed description for this project is provided by Roberto in this document: +Projects consumes selected messages from the CERN DIP system (LHC & ALICE -DCS) and publishes them into the O2 systems. A detailed description for this project is provided by Roberto in this document: https://codimd.web.cern.ch/G0TSXqA1R8iPqWw2w2wuew +### Requirements +- This program requires java 11 on a 64 bit system (this is a constrain from the DIP library) +- maven -This program requires java 11 on a 64 bit system -(this is a constrain from the DIP library) - -To test the java version run -java -version - -The run configuration is defined in the AliDip2BK.properties file. - -To run the program : - -sh runAliDip2BK.sh - -When the the program is stopped, it enters into the shutdown mode and it will -unsubscribe to the DIP data providers will wait to process the DipData queue -and saves the state of the fills and runs. +### Maven Commands for dev,tst,deployments +```bash +mvn compile -Dos.version={os_version} +mvn package -Dos.version={os_version} +``` +E.g. os_version `macosx-x86_64` diff --git a/build.xml b/build.xml deleted file mode 100644 index d64968f..0000000 --- a/build.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/kafka-clients-3.1.0.jar b/lib/kafka-clients-3.1.0.jar deleted file mode 100644 index a0cd8e4..0000000 Binary files a/lib/kafka-clients-3.1.0.jar and /dev/null differ diff --git a/lib/protobuf-java-3.20.0.jar b/lib/protobuf-java-3.20.0.jar deleted file mode 100644 index 56f9cc6..0000000 Binary files a/lib/protobuf-java-3.20.0.jar and /dev/null differ diff --git a/lib/slf4j-api-1.7.30.jar b/lib/slf4j-api-1.7.30.jar deleted file mode 100644 index 29ac26f..0000000 Binary files a/lib/slf4j-api-1.7.30.jar and /dev/null differ diff --git a/lib/slf4j-simple-1.7.30.jar b/lib/slf4j-simple-1.7.30.jar deleted file mode 100644 index 6debaa9..0000000 Binary files a/lib/slf4j-simple-1.7.30.jar and /dev/null differ diff --git a/lib64/PlatformDependent.a b/lib64/PlatformDependent.a deleted file mode 100644 index 78b6e61..0000000 Binary files a/lib64/PlatformDependent.a and /dev/null differ diff --git a/lib64/PlatformDependent.lib b/lib64/PlatformDependent.lib deleted file mode 100644 index c261260..0000000 Binary files a/lib64/PlatformDependent.lib and /dev/null differ diff --git a/lib64/dip-jni.nar b/lib64/dip-jni.nar deleted file mode 100644 index 8f0c790..0000000 Binary files a/lib64/dip-jni.nar and /dev/null differ diff --git a/lib64/dip.dll b/lib64/dip.dll deleted file mode 100644 index 0d0d0dc..0000000 Binary files a/lib64/dip.dll and /dev/null differ diff --git a/lib64/dip.lib b/lib64/dip.lib deleted file mode 100644 index 10abe5b..0000000 Binary files a/lib64/dip.lib and /dev/null differ diff --git a/lib64/jDIP.dll b/lib64/jDIP.dll deleted file mode 100644 index 39edf69..0000000 Binary files a/lib64/jDIP.dll and /dev/null differ diff --git a/lib64/jDIP.lib b/lib64/jDIP.lib deleted file mode 100644 index 47bde8e..0000000 Binary files a/lib64/jDIP.lib and /dev/null differ diff --git a/lib64/jdim.dll b/lib64/jdim.dll deleted file mode 100644 index f496342..0000000 Binary files a/lib64/jdim.dll and /dev/null differ diff --git a/lib64/jdim.lib b/lib64/jdim.lib deleted file mode 100644 index e14cf0b..0000000 Binary files a/lib64/jdim.lib and /dev/null differ diff --git a/lib64/libdip.so b/lib64/libdip.so deleted file mode 100644 index e0b5bbd..0000000 Binary files a/lib64/libdip.so and /dev/null differ diff --git a/lib64/libjDIP.so b/lib64/libjDIP.so deleted file mode 100644 index e23b848..0000000 Binary files a/lib64/libjDIP.so and /dev/null differ diff --git a/lib64/libjdim.so b/lib64/libjdim.so deleted file mode 100644 index 1dfd4ba..0000000 Binary files a/lib64/libjdim.so and /dev/null differ diff --git a/lib64/liblog4cplus.so b/lib64/liblog4cplus.so deleted file mode 100644 index 3d3e82f..0000000 Binary files a/lib64/liblog4cplus.so and /dev/null differ diff --git a/lib64/libplatform-dependent-6.1.a b/lib64/libplatform-dependent-6.1.a deleted file mode 100644 index 78b6e61..0000000 Binary files a/lib64/libplatform-dependent-6.1.a and /dev/null differ diff --git a/lib64/libplatform-dependent.a b/lib64/libplatform-dependent.a deleted file mode 100644 index 78b6e61..0000000 Binary files a/lib64/libplatform-dependent.a and /dev/null differ diff --git a/lib64/log4cplus.dll b/lib64/log4cplus.dll deleted file mode 100644 index d787fe5..0000000 Binary files a/lib64/log4cplus.dll and /dev/null differ diff --git a/lib64/log4cplus.lib b/lib64/log4cplus.lib deleted file mode 100644 index d2b15f0..0000000 Binary files a/lib64/log4cplus.lib and /dev/null differ diff --git a/lib64/platform-dependent-6.1.lib b/lib64/platform-dependent-6.1.lib deleted file mode 100644 index c261260..0000000 Binary files a/lib64/platform-dependent-6.1.lib and /dev/null differ diff --git a/lib64/platform-dependent.lib b/lib64/platform-dependent.lib deleted file mode 100644 index c261260..0000000 Binary files a/lib64/platform-dependent.lib and /dev/null differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..444b461 --- /dev/null +++ b/pom.xml @@ -0,0 +1,120 @@ + + 4.0.0 + ch.cern.alice.o2 + bkp-lhc-client + 3.0.0 + jar + + + 16 + 16 + UTF-8 + linux-x86_64 + 5.7.0 + 4.29.3 + 3.1.0 + 1.7.30 + 1.7.30 + + + + + cern.dip + dip + ${cern.dip.version} + system + ${project.basedir}/lib/cern_dip.jar + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + org.apache.kafka + kafka-clients + ${kafka.version} + + + org.slf4j + slf4j-api + ${slf4j-api.version} + + + org.slf4j + slf4j-simple + ${slf4j-simple.version} + + + + + o2-bkp-lhc-client-v${project.version} + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + com.google.protobuf:protoc:${protobuf.version}:exe:${os.version} + + + + + compile + test-compile + + + + + + + maven-compiler-plugin + 3.8.1 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.4.2 + + + + true + true + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + package + + shade + + + false + + + alice.dip.AliDip2BK + + + + + + + + + diff --git a/runAliDip2BK.sh b/runAliDip2BK.sh deleted file mode 100755 index 6b59b08..0000000 --- a/runAliDip2BK.sh +++ /dev/null @@ -1,4 +0,0 @@ -#start the Alice Dip to Bookkeeping program -BASE=`pwd` -export LD_LIBRARY_PATH=$BASE/lib64 -java -Dorg.slf4j.simpleLogger.defaultLogLevel=error -classpath $BASE/lib64/dip-jni.nar:$BASE/lib/*:$BASE/AliDip2BK.jar:.: alice.dip.AliDip2BK diff --git a/src/alice/dip/AlicePB.java b/src/alice/dip/AlicePB.java deleted file mode 100644 index 7d23343..0000000 --- a/src/alice/dip/AlicePB.java +++ /dev/null @@ -1,3111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: AlicePB.proto - -package alice.dip; - -// FIXME : this might be better to regenerate every time using a protobuf file? -public final class AlicePB { - private AlicePB() { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public interface NewStateNotificationOrBuilder extends - // @@protoc_insertion_point(interface_extends:alice.dip.NewStateNotification) - com.google.protobuf.MessageOrBuilder { - - /** - * .alice.dip.EnvInfo envInfo = 1; - * - * @return Whether the envInfo field is set. - */ - boolean hasEnvInfo(); - - /** - * .alice.dip.EnvInfo envInfo = 1; - * - * @return The envInfo. - */ - alice.dip.AlicePB.EnvInfo getEnvInfo(); - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - alice.dip.AlicePB.EnvInfoOrBuilder getEnvInfoOrBuilder(); - - /** - *
-     * ms since epoch
-     * 
- * - * uint64 timestamp = 2; - * - * @return The timestamp. - */ - long getTimestamp(); - } - - /** - * Protobuf type {@code alice.dip.NewStateNotification} - */ - public static final class NewStateNotification extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:alice.dip.NewStateNotification) - NewStateNotificationOrBuilder { - private static final long serialVersionUID = 0L; - - // Use NewStateNotification.newBuilder() to construct. - private NewStateNotification(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NewStateNotification() { - } - - @java.lang.Override - @SuppressWarnings({ "unused" }) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NewStateNotification(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private NewStateNotification( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - alice.dip.AlicePB.EnvInfo.Builder subBuilder = null; - if (envInfo_ != null) { - subBuilder = envInfo_.toBuilder(); - } - envInfo_ = input.readMessage(alice.dip.AlicePB.EnvInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(envInfo_); - envInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - timestamp_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return alice.dip.AlicePB.internal_static_alice_dip_NewStateNotification_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return alice.dip.AlicePB.internal_static_alice_dip_NewStateNotification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - alice.dip.AlicePB.NewStateNotification.class, alice.dip.AlicePB.NewStateNotification.Builder.class); - } - - public static final int ENVINFO_FIELD_NUMBER = 1; - private alice.dip.AlicePB.EnvInfo envInfo_; - - /** - * .alice.dip.EnvInfo envInfo = 1; - * - * @return Whether the envInfo field is set. - */ - @java.lang.Override - public boolean hasEnvInfo() { - return envInfo_ != null; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - * - * @return The envInfo. - */ - @java.lang.Override - public alice.dip.AlicePB.EnvInfo getEnvInfo() { - return envInfo_ == null ? alice.dip.AlicePB.EnvInfo.getDefaultInstance() : envInfo_; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - @java.lang.Override - public alice.dip.AlicePB.EnvInfoOrBuilder getEnvInfoOrBuilder() { - return getEnvInfo(); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 2; - private long timestamp_; - - /** - *
-     * ms since epoch
-     * 
- * - * uint64 timestamp = 2; - * - * @return The timestamp. - */ - @java.lang.Override - public long getTimestamp() { - return timestamp_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) - return true; - if (isInitialized == 0) - return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (envInfo_ != null) { - output.writeMessage(1, getEnvInfo()); - } - if (timestamp_ != 0L) { - output.writeUInt64(2, timestamp_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) - return size; - - size = 0; - if (envInfo_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEnvInfo()); - } - if (timestamp_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, timestamp_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof alice.dip.AlicePB.NewStateNotification)) { - return super.equals(obj); - } - alice.dip.AlicePB.NewStateNotification other = (alice.dip.AlicePB.NewStateNotification) obj; - - if (hasEnvInfo() != other.hasEnvInfo()) - return false; - if (hasEnvInfo()) { - if (!getEnvInfo() - .equals(other.getEnvInfo())) - return false; - } - if (getTimestamp() != other.getTimestamp()) - return false; - if (!unknownFields.equals(other.unknownFields)) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEnvInfo()) { - hash = (37 * hash) + ENVINFO_FIELD_NUMBER; - hash = (53 * hash) + getEnvInfo().hashCode(); - } - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTimestamp()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static alice.dip.AlicePB.NewStateNotification parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.NewStateNotification parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.NewStateNotification parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(alice.dip.AlicePB.NewStateNotification prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() - : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code alice.dip.NewStateNotification} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:alice.dip.NewStateNotification) - alice.dip.AlicePB.NewStateNotificationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return alice.dip.AlicePB.internal_static_alice_dip_NewStateNotification_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return alice.dip.AlicePB.internal_static_alice_dip_NewStateNotification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - alice.dip.AlicePB.NewStateNotification.class, alice.dip.AlicePB.NewStateNotification.Builder.class); - } - - // Construct using alice.dip.AlicePB.NewStateNotification.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (envInfoBuilder_ == null) { - envInfo_ = null; - } else { - envInfo_ = null; - envInfoBuilder_ = null; - } - timestamp_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return alice.dip.AlicePB.internal_static_alice_dip_NewStateNotification_descriptor; - } - - @java.lang.Override - public alice.dip.AlicePB.NewStateNotification getDefaultInstanceForType() { - return alice.dip.AlicePB.NewStateNotification.getDefaultInstance(); - } - - @java.lang.Override - public alice.dip.AlicePB.NewStateNotification build() { - alice.dip.AlicePB.NewStateNotification result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public alice.dip.AlicePB.NewStateNotification buildPartial() { - alice.dip.AlicePB.NewStateNotification result = new alice.dip.AlicePB.NewStateNotification(this); - if (envInfoBuilder_ == null) { - result.envInfo_ = envInfo_; - } else { - result.envInfo_ = envInfoBuilder_.build(); - } - result.timestamp_ = timestamp_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof alice.dip.AlicePB.NewStateNotification) { - return mergeFrom((alice.dip.AlicePB.NewStateNotification) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(alice.dip.AlicePB.NewStateNotification other) { - if (other == alice.dip.AlicePB.NewStateNotification.getDefaultInstance()) - return this; - if (other.hasEnvInfo()) { - mergeEnvInfo(other.getEnvInfo()); - } - if (other.getTimestamp() != 0L) { - setTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - alice.dip.AlicePB.NewStateNotification parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (alice.dip.AlicePB.NewStateNotification) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private alice.dip.AlicePB.EnvInfo envInfo_; - private com.google.protobuf.SingleFieldBuilderV3 envInfoBuilder_; - - /** - * .alice.dip.EnvInfo envInfo = 1; - * - * @return Whether the envInfo field is set. - */ - public boolean hasEnvInfo() { - return envInfoBuilder_ != null || envInfo_ != null; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - * - * @return The envInfo. - */ - public alice.dip.AlicePB.EnvInfo getEnvInfo() { - if (envInfoBuilder_ == null) { - return envInfo_ == null ? alice.dip.AlicePB.EnvInfo.getDefaultInstance() : envInfo_; - } else { - return envInfoBuilder_.getMessage(); - } - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - public Builder setEnvInfo(alice.dip.AlicePB.EnvInfo value) { - if (envInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - envInfo_ = value; - onChanged(); - } else { - envInfoBuilder_.setMessage(value); - } - - return this; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - public Builder setEnvInfo( - alice.dip.AlicePB.EnvInfo.Builder builderForValue) { - if (envInfoBuilder_ == null) { - envInfo_ = builderForValue.build(); - onChanged(); - } else { - envInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - public Builder mergeEnvInfo(alice.dip.AlicePB.EnvInfo value) { - if (envInfoBuilder_ == null) { - if (envInfo_ != null) { - envInfo_ = alice.dip.AlicePB.EnvInfo.newBuilder(envInfo_).mergeFrom(value).buildPartial(); - } else { - envInfo_ = value; - } - onChanged(); - } else { - envInfoBuilder_.mergeFrom(value); - } - - return this; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - public Builder clearEnvInfo() { - if (envInfoBuilder_ == null) { - envInfo_ = null; - onChanged(); - } else { - envInfo_ = null; - envInfoBuilder_ = null; - } - - return this; - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - public alice.dip.AlicePB.EnvInfo.Builder getEnvInfoBuilder() { - - onChanged(); - return getEnvInfoFieldBuilder().getBuilder(); - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - public alice.dip.AlicePB.EnvInfoOrBuilder getEnvInfoOrBuilder() { - if (envInfoBuilder_ != null) { - return envInfoBuilder_.getMessageOrBuilder(); - } else { - return envInfo_ == null ? alice.dip.AlicePB.EnvInfo.getDefaultInstance() : envInfo_; - } - } - - /** - * .alice.dip.EnvInfo envInfo = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3 getEnvInfoFieldBuilder() { - if (envInfoBuilder_ == null) { - envInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3( - getEnvInfo(), - getParentForChildren(), - isClean()); - envInfo_ = null; - } - return envInfoBuilder_; - } - - private long timestamp_; - - /** - *
-       * ms since epoch
-       * 
- * - * uint64 timestamp = 2; - * - * @return The timestamp. - */ - @java.lang.Override - public long getTimestamp() { - return timestamp_; - } - - /** - *
-       * ms since epoch
-       * 
- * - * uint64 timestamp = 2; - * - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp(long value) { - - timestamp_ = value; - onChanged(); - return this; - } - - /** - *
-       * ms since epoch
-       * 
- * - * uint64 timestamp = 2; - * - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - - timestamp_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:alice.dip.NewStateNotification) - } - - // @@protoc_insertion_point(class_scope:alice.dip.NewStateNotification) - private static final alice.dip.AlicePB.NewStateNotification DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new alice.dip.AlicePB.NewStateNotification(); - } - - public static alice.dip.AlicePB.NewStateNotification getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NewStateNotification parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NewStateNotification(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public alice.dip.AlicePB.NewStateNotification getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ActiveRunsListOrBuilder extends - // @@protoc_insertion_point(interface_extends:alice.dip.ActiveRunsList) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - java.util.List getActiveRunsList(); - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - alice.dip.AlicePB.EnvInfo getActiveRuns(int index); - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - int getActiveRunsCount(); - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - java.util.List getActiveRunsOrBuilderList(); - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - alice.dip.AlicePB.EnvInfoOrBuilder getActiveRunsOrBuilder( - int index); - - /** - *
-     * ms since epoch
-     * 
- * - * uint64 timestamp = 2; - * - * @return The timestamp. - */ - long getTimestamp(); - } - - /** - * Protobuf type {@code alice.dip.ActiveRunsList} - */ - public static final class ActiveRunsList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:alice.dip.ActiveRunsList) - ActiveRunsListOrBuilder { - private static final long serialVersionUID = 0L; - - // Use ActiveRunsList.newBuilder() to construct. - private ActiveRunsList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ActiveRunsList() { - activeRuns_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({ "unused" }) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ActiveRunsList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ActiveRunsList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - activeRuns_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - activeRuns_.add( - input.readMessage(alice.dip.AlicePB.EnvInfo.parser(), extensionRegistry)); - break; - } - case 16: { - - timestamp_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - activeRuns_ = java.util.Collections.unmodifiableList(activeRuns_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return alice.dip.AlicePB.internal_static_alice_dip_ActiveRunsList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return alice.dip.AlicePB.internal_static_alice_dip_ActiveRunsList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - alice.dip.AlicePB.ActiveRunsList.class, alice.dip.AlicePB.ActiveRunsList.Builder.class); - } - - public static final int ACTIVERUNS_FIELD_NUMBER = 1; - private java.util.List activeRuns_; - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - @java.lang.Override - public java.util.List getActiveRunsList() { - return activeRuns_; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - @java.lang.Override - public java.util.List getActiveRunsOrBuilderList() { - return activeRuns_; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - @java.lang.Override - public int getActiveRunsCount() { - return activeRuns_.size(); - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - @java.lang.Override - public alice.dip.AlicePB.EnvInfo getActiveRuns(int index) { - return activeRuns_.get(index); - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - @java.lang.Override - public alice.dip.AlicePB.EnvInfoOrBuilder getActiveRunsOrBuilder( - int index) { - return activeRuns_.get(index); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 2; - private long timestamp_; - - /** - *
-     * ms since epoch
-     * 
- * - * uint64 timestamp = 2; - * - * @return The timestamp. - */ - @java.lang.Override - public long getTimestamp() { - return timestamp_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) - return true; - if (isInitialized == 0) - return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < activeRuns_.size(); i++) { - output.writeMessage(1, activeRuns_.get(i)); - } - if (timestamp_ != 0L) { - output.writeUInt64(2, timestamp_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) - return size; - - size = 0; - for (int i = 0; i < activeRuns_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, activeRuns_.get(i)); - } - if (timestamp_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, timestamp_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof alice.dip.AlicePB.ActiveRunsList)) { - return super.equals(obj); - } - alice.dip.AlicePB.ActiveRunsList other = (alice.dip.AlicePB.ActiveRunsList) obj; - - if (!getActiveRunsList() - .equals(other.getActiveRunsList())) - return false; - if (getTimestamp() != other.getTimestamp()) - return false; - if (!unknownFields.equals(other.unknownFields)) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getActiveRunsCount() > 0) { - hash = (37 * hash) + ACTIVERUNS_FIELD_NUMBER; - hash = (53 * hash) + getActiveRunsList().hashCode(); - } - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTimestamp()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static alice.dip.AlicePB.ActiveRunsList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.ActiveRunsList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.ActiveRunsList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(alice.dip.AlicePB.ActiveRunsList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() - : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code alice.dip.ActiveRunsList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:alice.dip.ActiveRunsList) - alice.dip.AlicePB.ActiveRunsListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return alice.dip.AlicePB.internal_static_alice_dip_ActiveRunsList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return alice.dip.AlicePB.internal_static_alice_dip_ActiveRunsList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - alice.dip.AlicePB.ActiveRunsList.class, alice.dip.AlicePB.ActiveRunsList.Builder.class); - } - - // Construct using alice.dip.AlicePB.ActiveRunsList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getActiveRunsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (activeRunsBuilder_ == null) { - activeRuns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - activeRunsBuilder_.clear(); - } - timestamp_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return alice.dip.AlicePB.internal_static_alice_dip_ActiveRunsList_descriptor; - } - - @java.lang.Override - public alice.dip.AlicePB.ActiveRunsList getDefaultInstanceForType() { - return alice.dip.AlicePB.ActiveRunsList.getDefaultInstance(); - } - - @java.lang.Override - public alice.dip.AlicePB.ActiveRunsList build() { - alice.dip.AlicePB.ActiveRunsList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public alice.dip.AlicePB.ActiveRunsList buildPartial() { - alice.dip.AlicePB.ActiveRunsList result = new alice.dip.AlicePB.ActiveRunsList(this); - int from_bitField0_ = bitField0_; - if (activeRunsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - activeRuns_ = java.util.Collections.unmodifiableList(activeRuns_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.activeRuns_ = activeRuns_; - } else { - result.activeRuns_ = activeRunsBuilder_.build(); - } - result.timestamp_ = timestamp_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof alice.dip.AlicePB.ActiveRunsList) { - return mergeFrom((alice.dip.AlicePB.ActiveRunsList) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(alice.dip.AlicePB.ActiveRunsList other) { - if (other == alice.dip.AlicePB.ActiveRunsList.getDefaultInstance()) - return this; - if (activeRunsBuilder_ == null) { - if (!other.activeRuns_.isEmpty()) { - if (activeRuns_.isEmpty()) { - activeRuns_ = other.activeRuns_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureActiveRunsIsMutable(); - activeRuns_.addAll(other.activeRuns_); - } - onChanged(); - } - } else { - if (!other.activeRuns_.isEmpty()) { - if (activeRunsBuilder_.isEmpty()) { - activeRunsBuilder_.dispose(); - activeRunsBuilder_ = null; - activeRuns_ = other.activeRuns_; - bitField0_ = (bitField0_ & ~0x00000001); - activeRunsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getActiveRunsFieldBuilder() - : null; - } else { - activeRunsBuilder_.addAllMessages(other.activeRuns_); - } - } - } - if (other.getTimestamp() != 0L) { - setTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - alice.dip.AlicePB.ActiveRunsList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (alice.dip.AlicePB.ActiveRunsList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List activeRuns_ = java.util.Collections.emptyList(); - - private void ensureActiveRunsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - activeRuns_ = new java.util.ArrayList(activeRuns_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3 activeRunsBuilder_; - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public java.util.List getActiveRunsList() { - if (activeRunsBuilder_ == null) { - return java.util.Collections.unmodifiableList(activeRuns_); - } else { - return activeRunsBuilder_.getMessageList(); - } - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public int getActiveRunsCount() { - if (activeRunsBuilder_ == null) { - return activeRuns_.size(); - } else { - return activeRunsBuilder_.getCount(); - } - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public alice.dip.AlicePB.EnvInfo getActiveRuns(int index) { - if (activeRunsBuilder_ == null) { - return activeRuns_.get(index); - } else { - return activeRunsBuilder_.getMessage(index); - } - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder setActiveRuns( - int index, alice.dip.AlicePB.EnvInfo value) { - if (activeRunsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActiveRunsIsMutable(); - activeRuns_.set(index, value); - onChanged(); - } else { - activeRunsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder setActiveRuns( - int index, alice.dip.AlicePB.EnvInfo.Builder builderForValue) { - if (activeRunsBuilder_ == null) { - ensureActiveRunsIsMutable(); - activeRuns_.set(index, builderForValue.build()); - onChanged(); - } else { - activeRunsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder addActiveRuns(alice.dip.AlicePB.EnvInfo value) { - if (activeRunsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActiveRunsIsMutable(); - activeRuns_.add(value); - onChanged(); - } else { - activeRunsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder addActiveRuns( - int index, alice.dip.AlicePB.EnvInfo value) { - if (activeRunsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActiveRunsIsMutable(); - activeRuns_.add(index, value); - onChanged(); - } else { - activeRunsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder addActiveRuns( - alice.dip.AlicePB.EnvInfo.Builder builderForValue) { - if (activeRunsBuilder_ == null) { - ensureActiveRunsIsMutable(); - activeRuns_.add(builderForValue.build()); - onChanged(); - } else { - activeRunsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder addActiveRuns( - int index, alice.dip.AlicePB.EnvInfo.Builder builderForValue) { - if (activeRunsBuilder_ == null) { - ensureActiveRunsIsMutable(); - activeRuns_.add(index, builderForValue.build()); - onChanged(); - } else { - activeRunsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder addAllActiveRuns( - java.lang.Iterable values) { - if (activeRunsBuilder_ == null) { - ensureActiveRunsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, activeRuns_); - onChanged(); - } else { - activeRunsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder clearActiveRuns() { - if (activeRunsBuilder_ == null) { - activeRuns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - activeRunsBuilder_.clear(); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public Builder removeActiveRuns(int index) { - if (activeRunsBuilder_ == null) { - ensureActiveRunsIsMutable(); - activeRuns_.remove(index); - onChanged(); - } else { - activeRunsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public alice.dip.AlicePB.EnvInfo.Builder getActiveRunsBuilder( - int index) { - return getActiveRunsFieldBuilder().getBuilder(index); - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public alice.dip.AlicePB.EnvInfoOrBuilder getActiveRunsOrBuilder( - int index) { - if (activeRunsBuilder_ == null) { - return activeRuns_.get(index); - } else { - return activeRunsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public java.util.List getActiveRunsOrBuilderList() { - if (activeRunsBuilder_ != null) { - return activeRunsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(activeRuns_); - } - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public alice.dip.AlicePB.EnvInfo.Builder addActiveRunsBuilder() { - return getActiveRunsFieldBuilder().addBuilder( - alice.dip.AlicePB.EnvInfo.getDefaultInstance()); - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public alice.dip.AlicePB.EnvInfo.Builder addActiveRunsBuilder( - int index) { - return getActiveRunsFieldBuilder().addBuilder( - index, alice.dip.AlicePB.EnvInfo.getDefaultInstance()); - } - - /** - * repeated .alice.dip.EnvInfo activeRuns = 1; - */ - public java.util.List getActiveRunsBuilderList() { - return getActiveRunsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3 getActiveRunsFieldBuilder() { - if (activeRunsBuilder_ == null) { - activeRunsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3( - activeRuns_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - activeRuns_ = null; - } - return activeRunsBuilder_; - } - - private long timestamp_; - - /** - *
-       * ms since epoch
-       * 
- * - * uint64 timestamp = 2; - * - * @return The timestamp. - */ - @java.lang.Override - public long getTimestamp() { - return timestamp_; - } - - /** - *
-       * ms since epoch
-       * 
- * - * uint64 timestamp = 2; - * - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp(long value) { - - timestamp_ = value; - onChanged(); - return this; - } - - /** - *
-       * ms since epoch
-       * 
- * - * uint64 timestamp = 2; - * - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - - timestamp_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:alice.dip.ActiveRunsList) - } - - // @@protoc_insertion_point(class_scope:alice.dip.ActiveRunsList) - private static final alice.dip.AlicePB.ActiveRunsList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new alice.dip.AlicePB.ActiveRunsList(); - } - - public static alice.dip.AlicePB.ActiveRunsList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ActiveRunsList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ActiveRunsList(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public alice.dip.AlicePB.ActiveRunsList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface EnvInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:alice.dip.EnvInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * string environmentId = 1; - * - * @return The environmentId. - */ - java.lang.String getEnvironmentId(); - - /** - * string environmentId = 1; - * - * @return The bytes for environmentId. - */ - com.google.protobuf.ByteString getEnvironmentIdBytes(); - - /** - * optional uint32 runNumber = 2; - * - * @return Whether the runNumber field is set. - */ - boolean hasRunNumber(); - - /** - * optional uint32 runNumber = 2; - * - * @return The runNumber. - */ - int getRunNumber(); - - /** - * optional string runType = 3; - * - * @return Whether the runType field is set. - */ - boolean hasRunType(); - - /** - * optional string runType = 3; - * - * @return The runType. - */ - java.lang.String getRunType(); - - /** - * optional string runType = 3; - * - * @return The bytes for runType. - */ - com.google.protobuf.ByteString getRunTypeBytes(); - - /** - * string state = 4; - * - * @return The state. - */ - java.lang.String getState(); - - /** - * string state = 4; - * - * @return The bytes for state. - */ - com.google.protobuf.ByteString getStateBytes(); - - /** - * repeated string detectors = 5; - * - * @return A list containing the detectors. - */ - java.util.List getDetectorsList(); - - /** - * repeated string detectors = 5; - * - * @return The count of detectors. - */ - int getDetectorsCount(); - - /** - * repeated string detectors = 5; - * - * @param index The index of the element to return. - * @return The detectors at the given index. - */ - java.lang.String getDetectors(int index); - - /** - * repeated string detectors = 5; - * - * @param index The index of the value to return. - * @return The bytes of the detectors at the given index. - */ - com.google.protobuf.ByteString getDetectorsBytes(int index); - } - - /** - * Protobuf type {@code alice.dip.EnvInfo} - */ - public static final class EnvInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:alice.dip.EnvInfo) - EnvInfoOrBuilder { - private static final long serialVersionUID = 0L; - - // Use EnvInfo.newBuilder() to construct. - private EnvInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EnvInfo() { - environmentId_ = ""; - runType_ = ""; - state_ = ""; - detectors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({ "unused" }) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EnvInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EnvInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - environmentId_ = s; - break; - } - case 16: { - bitField0_ |= 0x00000001; - runNumber_ = input.readUInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - runType_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - state_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - detectors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - detectors_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - detectors_ = detectors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return alice.dip.AlicePB.internal_static_alice_dip_EnvInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return alice.dip.AlicePB.internal_static_alice_dip_EnvInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - alice.dip.AlicePB.EnvInfo.class, alice.dip.AlicePB.EnvInfo.Builder.class); - } - - private int bitField0_; - public static final int ENVIRONMENTID_FIELD_NUMBER = 1; - private volatile java.lang.Object environmentId_; - - /** - * string environmentId = 1; - * - * @return The environmentId. - */ - @java.lang.Override - public java.lang.String getEnvironmentId() { - java.lang.Object ref = environmentId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - environmentId_ = s; - return s; - } - } - - /** - * string environmentId = 1; - * - * @return The bytes for environmentId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEnvironmentIdBytes() { - java.lang.Object ref = environmentId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - environmentId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RUNNUMBER_FIELD_NUMBER = 2; - private int runNumber_; - - /** - * optional uint32 runNumber = 2; - * - * @return Whether the runNumber field is set. - */ - @java.lang.Override - public boolean hasRunNumber() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * optional uint32 runNumber = 2; - * - * @return The runNumber. - */ - @java.lang.Override - public int getRunNumber() { - return runNumber_; - } - - public static final int RUNTYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object runType_; - - /** - * optional string runType = 3; - * - * @return Whether the runType field is set. - */ - @java.lang.Override - public boolean hasRunType() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * optional string runType = 3; - * - * @return The runType. - */ - @java.lang.Override - public java.lang.String getRunType() { - java.lang.Object ref = runType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - runType_ = s; - return s; - } - } - - /** - * optional string runType = 3; - * - * @return The bytes for runType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRunTypeBytes() { - java.lang.Object ref = runType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - runType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 4; - private volatile java.lang.Object state_; - - /** - * string state = 4; - * - * @return The state. - */ - @java.lang.Override - public java.lang.String getState() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } - } - - /** - * string state = 4; - * - * @return The bytes for state. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DETECTORS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList detectors_; - - /** - * repeated string detectors = 5; - * - * @return A list containing the detectors. - */ - public com.google.protobuf.ProtocolStringList getDetectorsList() { - return detectors_; - } - - /** - * repeated string detectors = 5; - * - * @return The count of detectors. - */ - public int getDetectorsCount() { - return detectors_.size(); - } - - /** - * repeated string detectors = 5; - * - * @param index The index of the element to return. - * @return The detectors at the given index. - */ - public java.lang.String getDetectors(int index) { - return detectors_.get(index); - } - - /** - * repeated string detectors = 5; - * - * @param index The index of the value to return. - * @return The bytes of the detectors at the given index. - */ - public com.google.protobuf.ByteString getDetectorsBytes(int index) { - return detectors_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) - return true; - if (isInitialized == 0) - return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environmentId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environmentId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(2, runNumber_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, runType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, state_); - } - for (int i = 0; i < detectors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, detectors_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) - return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environmentId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environmentId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, runNumber_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, runType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, state_); - } - { - int dataSize = 0; - for (int i = 0; i < detectors_.size(); i++) { - dataSize += computeStringSizeNoTag(detectors_.getRaw(i)); - } - size += dataSize; - size += 1 * getDetectorsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof alice.dip.AlicePB.EnvInfo)) { - return super.equals(obj); - } - alice.dip.AlicePB.EnvInfo other = (alice.dip.AlicePB.EnvInfo) obj; - - if (!getEnvironmentId() - .equals(other.getEnvironmentId())) - return false; - if (hasRunNumber() != other.hasRunNumber()) - return false; - if (hasRunNumber()) { - if (getRunNumber() != other.getRunNumber()) - return false; - } - if (hasRunType() != other.hasRunType()) - return false; - if (hasRunType()) { - if (!getRunType() - .equals(other.getRunType())) - return false; - } - if (!getState() - .equals(other.getState())) - return false; - if (!getDetectorsList() - .equals(other.getDetectorsList())) - return false; - if (!unknownFields.equals(other.unknownFields)) - return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENVIRONMENTID_FIELD_NUMBER; - hash = (53 * hash) + getEnvironmentId().hashCode(); - if (hasRunNumber()) { - hash = (37 * hash) + RUNNUMBER_FIELD_NUMBER; - hash = (53 * hash) + getRunNumber(); - } - if (hasRunType()) { - hash = (37 * hash) + RUNTYPE_FIELD_NUMBER; - hash = (53 * hash) + getRunType().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + getState().hashCode(); - if (getDetectorsCount() > 0) { - hash = (37 * hash) + DETECTORS_FIELD_NUMBER; - hash = (53 * hash) + getDetectorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static alice.dip.AlicePB.EnvInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.EnvInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - - public static alice.dip.AlicePB.EnvInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(alice.dip.AlicePB.EnvInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() - : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code alice.dip.EnvInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:alice.dip.EnvInfo) - alice.dip.AlicePB.EnvInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return alice.dip.AlicePB.internal_static_alice_dip_EnvInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return alice.dip.AlicePB.internal_static_alice_dip_EnvInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - alice.dip.AlicePB.EnvInfo.class, alice.dip.AlicePB.EnvInfo.Builder.class); - } - - // Construct using alice.dip.AlicePB.EnvInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - environmentId_ = ""; - - runNumber_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - runType_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - state_ = ""; - - detectors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return alice.dip.AlicePB.internal_static_alice_dip_EnvInfo_descriptor; - } - - @java.lang.Override - public alice.dip.AlicePB.EnvInfo getDefaultInstanceForType() { - return alice.dip.AlicePB.EnvInfo.getDefaultInstance(); - } - - @java.lang.Override - public alice.dip.AlicePB.EnvInfo build() { - alice.dip.AlicePB.EnvInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public alice.dip.AlicePB.EnvInfo buildPartial() { - alice.dip.AlicePB.EnvInfo result = new alice.dip.AlicePB.EnvInfo(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.environmentId_ = environmentId_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.runNumber_ = runNumber_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.runType_ = runType_; - result.state_ = state_; - if (((bitField0_ & 0x00000004) != 0)) { - detectors_ = detectors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.detectors_ = detectors_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof alice.dip.AlicePB.EnvInfo) { - return mergeFrom((alice.dip.AlicePB.EnvInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(alice.dip.AlicePB.EnvInfo other) { - if (other == alice.dip.AlicePB.EnvInfo.getDefaultInstance()) - return this; - if (!other.getEnvironmentId().isEmpty()) { - environmentId_ = other.environmentId_; - onChanged(); - } - if (other.hasRunNumber()) { - setRunNumber(other.getRunNumber()); - } - if (other.hasRunType()) { - bitField0_ |= 0x00000002; - runType_ = other.runType_; - onChanged(); - } - if (!other.getState().isEmpty()) { - state_ = other.state_; - onChanged(); - } - if (!other.detectors_.isEmpty()) { - if (detectors_.isEmpty()) { - detectors_ = other.detectors_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDetectorsIsMutable(); - detectors_.addAll(other.detectors_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - alice.dip.AlicePB.EnvInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (alice.dip.AlicePB.EnvInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object environmentId_ = ""; - - /** - * string environmentId = 1; - * - * @return The environmentId. - */ - public java.lang.String getEnvironmentId() { - java.lang.Object ref = environmentId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - environmentId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * string environmentId = 1; - * - * @return The bytes for environmentId. - */ - public com.google.protobuf.ByteString getEnvironmentIdBytes() { - java.lang.Object ref = environmentId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - environmentId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * string environmentId = 1; - * - * @param value The environmentId to set. - * @return This builder for chaining. - */ - public Builder setEnvironmentId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - environmentId_ = value; - onChanged(); - return this; - } - - /** - * string environmentId = 1; - * - * @return This builder for chaining. - */ - public Builder clearEnvironmentId() { - - environmentId_ = getDefaultInstance().getEnvironmentId(); - onChanged(); - return this; - } - - /** - * string environmentId = 1; - * - * @param value The bytes for environmentId to set. - * @return This builder for chaining. - */ - public Builder setEnvironmentIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - environmentId_ = value; - onChanged(); - return this; - } - - private int runNumber_; - - /** - * optional uint32 runNumber = 2; - * - * @return Whether the runNumber field is set. - */ - @java.lang.Override - public boolean hasRunNumber() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * optional uint32 runNumber = 2; - * - * @return The runNumber. - */ - @java.lang.Override - public int getRunNumber() { - return runNumber_; - } - - /** - * optional uint32 runNumber = 2; - * - * @param value The runNumber to set. - * @return This builder for chaining. - */ - public Builder setRunNumber(int value) { - bitField0_ |= 0x00000001; - runNumber_ = value; - onChanged(); - return this; - } - - /** - * optional uint32 runNumber = 2; - * - * @return This builder for chaining. - */ - public Builder clearRunNumber() { - bitField0_ = (bitField0_ & ~0x00000001); - runNumber_ = 0; - onChanged(); - return this; - } - - private java.lang.Object runType_ = ""; - - /** - * optional string runType = 3; - * - * @return Whether the runType field is set. - */ - public boolean hasRunType() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * optional string runType = 3; - * - * @return The runType. - */ - public java.lang.String getRunType() { - java.lang.Object ref = runType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - runType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string runType = 3; - * - * @return The bytes for runType. - */ - public com.google.protobuf.ByteString getRunTypeBytes() { - java.lang.Object ref = runType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - runType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string runType = 3; - * - * @param value The runType to set. - * @return This builder for chaining. - */ - public Builder setRunType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - runType_ = value; - onChanged(); - return this; - } - - /** - * optional string runType = 3; - * - * @return This builder for chaining. - */ - public Builder clearRunType() { - bitField0_ = (bitField0_ & ~0x00000002); - runType_ = getDefaultInstance().getRunType(); - onChanged(); - return this; - } - - /** - * optional string runType = 3; - * - * @param value The bytes for runType to set. - * @return This builder for chaining. - */ - public Builder setRunTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - bitField0_ |= 0x00000002; - runType_ = value; - onChanged(); - return this; - } - - private java.lang.Object state_ = ""; - - /** - * string state = 4; - * - * @return The state. - */ - public java.lang.String getState() { - java.lang.Object ref = state_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * string state = 4; - * - * @return The bytes for state. - */ - public com.google.protobuf.ByteString getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * string state = 4; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value; - onChanged(); - return this; - } - - /** - * string state = 4; - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = getDefaultInstance().getState(); - onChanged(); - return this; - } - - /** - * string state = 4; - * - * @param value The bytes for state to set. - * @return This builder for chaining. - */ - public Builder setStateBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - state_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList detectors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureDetectorsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - detectors_ = new com.google.protobuf.LazyStringArrayList(detectors_); - bitField0_ |= 0x00000004; - } - } - - /** - * repeated string detectors = 5; - * - * @return A list containing the detectors. - */ - public com.google.protobuf.ProtocolStringList getDetectorsList() { - return detectors_.getUnmodifiableView(); - } - - /** - * repeated string detectors = 5; - * - * @return The count of detectors. - */ - public int getDetectorsCount() { - return detectors_.size(); - } - - /** - * repeated string detectors = 5; - * - * @param index The index of the element to return. - * @return The detectors at the given index. - */ - public java.lang.String getDetectors(int index) { - return detectors_.get(index); - } - - /** - * repeated string detectors = 5; - * - * @param index The index of the value to return. - * @return The bytes of the detectors at the given index. - */ - public com.google.protobuf.ByteString getDetectorsBytes(int index) { - return detectors_.getByteString(index); - } - - /** - * repeated string detectors = 5; - * - * @param index The index to set the value at. - * @param value The detectors to set. - * @return This builder for chaining. - */ - public Builder setDetectors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectorsIsMutable(); - detectors_.set(index, value); - onChanged(); - return this; - } - - /** - * repeated string detectors = 5; - * - * @param value The detectors to add. - * @return This builder for chaining. - */ - public Builder addDetectors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectorsIsMutable(); - detectors_.add(value); - onChanged(); - return this; - } - - /** - * repeated string detectors = 5; - * - * @param values The detectors to add. - * @return This builder for chaining. - */ - public Builder addAllDetectors( - java.lang.Iterable values) { - ensureDetectorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectors_); - onChanged(); - return this; - } - - /** - * repeated string detectors = 5; - * - * @return This builder for chaining. - */ - public Builder clearDetectors() { - detectors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - /** - * repeated string detectors = 5; - * - * @param value The bytes of the detectors to add. - * @return This builder for chaining. - */ - public Builder addDetectorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDetectorsIsMutable(); - detectors_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:alice.dip.EnvInfo) - } - - // @@protoc_insertion_point(class_scope:alice.dip.EnvInfo) - private static final alice.dip.AlicePB.EnvInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new alice.dip.AlicePB.EnvInfo(); - } - - public static alice.dip.AlicePB.EnvInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnvInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EnvInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public alice.dip.AlicePB.EnvInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor internal_static_alice_dip_NewStateNotification_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_alice_dip_NewStateNotification_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_alice_dip_ActiveRunsList_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_alice_dip_ActiveRunsList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_alice_dip_EnvInfo_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_alice_dip_EnvInfo_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - static { - java.lang.String[] descriptorData = { - "\n\rAlicePB.proto\022\talice.dip\"N\n\024NewStateNo" + - "tification\022#\n\007envInfo\030\001 \001(\0132\022.alice.dip." + - "EnvInfo\022\021\n\ttimestamp\030\002 \001(\004\"K\n\016ActiveRuns" + - "List\022&\n\nactiveRuns\030\001 \003(\0132\022.alice.dip.Env" + - "Info\022\021\n\ttimestamp\030\002 \001(\004\"\212\001\n\007EnvInfo\022\025\n\re" + - "nvironmentId\030\001 \001(\t\022\026\n\trunNumber\030\002 \001(\rH\000\210" + - "\001\001\022\024\n\007runType\030\003 \001(\tH\001\210\001\001\022\r\n\005state\030\004 \001(\t\022" + - "\021\n\tdetectors\030\005 \003(\tB\014\n\n_runNumberB\n\n\010_run" + - "TypeB\016Z\014protos;kafkab\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_alice_dip_NewStateNotification_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_alice_dip_NewStateNotification_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_alice_dip_NewStateNotification_descriptor, - new java.lang.String[] { "EnvInfo", "Timestamp", }); - internal_static_alice_dip_ActiveRunsList_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_alice_dip_ActiveRunsList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_alice_dip_ActiveRunsList_descriptor, - new java.lang.String[] { "ActiveRuns", "Timestamp", }); - internal_static_alice_dip_EnvInfo_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_alice_dip_EnvInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_alice_dip_EnvInfo_descriptor, - new java.lang.String[] { "EnvironmentId", "RunNumber", "RunType", "State", "Detectors", "RunNumber", - "RunType", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/src/alice/dip/AliDip2BK.java b/src/main/java/alice/dip/AliDip2BK.java similarity index 100% rename from src/alice/dip/AliDip2BK.java rename to src/main/java/alice/dip/AliDip2BK.java diff --git a/src/alice/dip/AliceInfoObj.java b/src/main/java/alice/dip/AliceInfoObj.java similarity index 100% rename from src/alice/dip/AliceInfoObj.java rename to src/main/java/alice/dip/AliceInfoObj.java diff --git a/src/alice/dip/BookkeepingClient.java b/src/main/java/alice/dip/BookkeepingClient.java similarity index 100% rename from src/alice/dip/BookkeepingClient.java rename to src/main/java/alice/dip/BookkeepingClient.java diff --git a/src/alice/dip/DipClient.java b/src/main/java/alice/dip/DipClient.java similarity index 100% rename from src/alice/dip/DipClient.java rename to src/main/java/alice/dip/DipClient.java diff --git a/src/alice/dip/DipMessagesProcessor.java b/src/main/java/alice/dip/DipMessagesProcessor.java similarity index 100% rename from src/alice/dip/DipMessagesProcessor.java rename to src/main/java/alice/dip/DipMessagesProcessor.java diff --git a/src/alice/dip/EndOfRunKafkaConsumer.java b/src/main/java/alice/dip/EndOfRunKafkaConsumer.java similarity index 96% rename from src/alice/dip/EndOfRunKafkaConsumer.java rename to src/main/java/alice/dip/EndOfRunKafkaConsumer.java index 768ab24..422b229 100644 --- a/src/alice/dip/EndOfRunKafkaConsumer.java +++ b/src/main/java/alice/dip/EndOfRunKafkaConsumer.java @@ -13,7 +13,7 @@ import com.google.protobuf.InvalidProtocolBufferException; -import alice.dip.AlicePB.NewStateNotification; +import ch.cern.alice.o2.control.kafka.Kafka; import java.time.Duration; import java.util.Arrays; @@ -70,7 +70,7 @@ public void run() { byte[] cucu = record.value(); try { - NewStateNotification info = NewStateNotification.parseFrom(cucu); + Kafka.NewStateNotification info = Kafka.NewStateNotification.parseFrom(cucu); AliDip2BK.log(1, "KC_EOR.run", "New Kafka mess; partition=" + record.partition() + " offset=" + record.offset() + " L=" + cucu.length + " RUN=" + info.getEnvInfo().getRunNumber() + " " + info.getEnvInfo().getState() + " ENVID = " diff --git a/src/alice/dip/LhcInfoObj.java b/src/main/java/alice/dip/LhcInfoObj.java similarity index 100% rename from src/alice/dip/LhcInfoObj.java rename to src/main/java/alice/dip/LhcInfoObj.java diff --git a/src/alice/dip/LuminosityManager.java b/src/main/java/alice/dip/LuminosityManager.java similarity index 100% rename from src/alice/dip/LuminosityManager.java rename to src/main/java/alice/dip/LuminosityManager.java diff --git a/src/alice/dip/LuminosityView.java b/src/main/java/alice/dip/LuminosityView.java similarity index 100% rename from src/alice/dip/LuminosityView.java rename to src/main/java/alice/dip/LuminosityView.java diff --git a/src/alice/dip/MessageItem.java b/src/main/java/alice/dip/MessageItem.java similarity index 100% rename from src/alice/dip/MessageItem.java rename to src/main/java/alice/dip/MessageItem.java diff --git a/src/alice/dip/PhaseShift.java b/src/main/java/alice/dip/PhaseShift.java similarity index 100% rename from src/alice/dip/PhaseShift.java rename to src/main/java/alice/dip/PhaseShift.java diff --git a/src/alice/dip/RunInfoObj.java b/src/main/java/alice/dip/RunInfoObj.java similarity index 100% rename from src/alice/dip/RunInfoObj.java rename to src/main/java/alice/dip/RunInfoObj.java diff --git a/src/alice/dip/SimDipEventsFill.java b/src/main/java/alice/dip/SimDipEventsFill.java similarity index 100% rename from src/alice/dip/SimDipEventsFill.java rename to src/main/java/alice/dip/SimDipEventsFill.java diff --git a/src/alice/dip/StartOfRunKafkaConsumer.java b/src/main/java/alice/dip/StartOfRunKafkaConsumer.java similarity index 95% rename from src/alice/dip/StartOfRunKafkaConsumer.java rename to src/main/java/alice/dip/StartOfRunKafkaConsumer.java index 23fc062..896b397 100644 --- a/src/alice/dip/StartOfRunKafkaConsumer.java +++ b/src/main/java/alice/dip/StartOfRunKafkaConsumer.java @@ -13,7 +13,7 @@ import com.google.protobuf.InvalidProtocolBufferException; -import alice.dip.AlicePB.NewStateNotification; +import ch.cern.alice.o2.control.kafka.Kafka; import java.time.Duration; import java.util.Arrays; @@ -67,7 +67,7 @@ public void run() { NoMess = NoMess + 1; try { - NewStateNotification info = NewStateNotification.parseFrom(cucu); + Kafka.NewStateNotification info = Kafka.NewStateNotification.parseFrom(cucu); AliDip2BK.log(1, "KC_SOR.run", "New Kafka mess; partition=" + record.partition() + " offset=" + record.offset() + " L=" + cucu.length + " RUN=" + info.getEnvInfo().getRunNumber() + " " + info.getEnvInfo().getState() + " ENVID = " diff --git a/src/alice/dip/TimestampedFloat.java b/src/main/java/alice/dip/TimestampedFloat.java similarity index 100% rename from src/alice/dip/TimestampedFloat.java rename to src/main/java/alice/dip/TimestampedFloat.java diff --git a/src/alice/dip/TimestampedString.java b/src/main/java/alice/dip/TimestampedString.java similarity index 100% rename from src/alice/dip/TimestampedString.java rename to src/main/java/alice/dip/TimestampedString.java diff --git a/src/alice/dip/Util.java b/src/main/java/alice/dip/Util.java similarity index 100% rename from src/alice/dip/Util.java rename to src/main/java/alice/dip/Util.java diff --git a/src/main/proto/kafka.proto b/src/main/proto/kafka.proto new file mode 100644 index 0000000..c17e5d6 --- /dev/null +++ b/src/main/proto/kafka.proto @@ -0,0 +1,43 @@ +/** + * @license + * Copyright 2019-2020 CERN and copyright holders of ALICE O2. + * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. + * All rights not expressly granted are reserved. + * + * This software is distributed under the terms of the GNU General Public + * License v3 (GPL Version 3), copied verbatim in the file "COPYING". + * + * In applying this license CERN does not waive the privileges and immunities + * granted to it by virtue of its status as an Intergovernmental Organization + * or submit itself to any jurisdiction. + */ + + /** + * @file kafka.proto - defined and maintained by Control System: + * https://github.com/AliceO2Group/Control/blob/cb4ebcbdd91ade13515865df03d75313100f0309/core/integration/kafka/protos/kafka.proto + * Do not edit or copy this file to other locations! + */ + +syntax = "proto3"; +package kafka; +option go_package = "github.com/AliceO2Group/Control/core/integration/kafka/protos;kafka"; +option java_package = "ch.cern.alice.o2.control.kafka"; + +message NewStateNotification { + EnvInfo envInfo = 1; + uint64 timestamp = 2; // ms since epoch +} + +message ActiveRunsList { + repeated EnvInfo activeRuns = 1; + uint64 timestamp = 2; // ms since epoch +} + +message EnvInfo { + string environmentId = 1; + optional uint32 runNumber = 2; + optional string runType = 3; + string state = 4; + repeated string detectors = 5; + uint64 enterStateTimestamp = 6; // ms since epoch. +} diff --git a/startAliDip2BK.sh b/startAliDip2BK.sh deleted file mode 100755 index 520d8bf..0000000 --- a/startAliDip2BK.sh +++ /dev/null @@ -1,22 +0,0 @@ -SERVICE_NAME=AliDip2BK -#PATH_TO_ALI=/home/cil/TEST_GIT/AliDip2BK -PATH_TO_ALI=`pwd` -BASE=$PATH_TO_ALI -DATE=`date +%d-%m-%y` -OPT=-Dorg.slf4j.simpleLogger.defaultLogLevel=error -CLASS=$BASE/lib64/dip-jni.nar:$BASE/lib/*:$BASE/AliDip2BK.jar:.: -PID_PATH_NAME=$PATH_TO_ALI/AliDip2BK.pid -LOG_FILE=$PATH_TO_ALI/LOG_${DATE}.txt - -echo "Starting $SERVICE_NAME ..." - export LD_LIBRARY_PATH=$BASE/lib64 - - if [ ! -f $PID_PATH_NAME ]; then - nohup java $OPT -classpath $CLASS alice.dip.AliDip2BK >> $LOG_FILE 2>&1 & - PID=$! - echo $PID - echo $PID > $PID_PATH_NAME - echo "$SERVICE_NAME started ..." - else - echo "$SERVICE_NAME is already running ..." - fi diff --git a/stopAliDip2BK.sh b/stopAliDip2BK.sh deleted file mode 100755 index 5b242f3..0000000 --- a/stopAliDip2BK.sh +++ /dev/null @@ -1,12 +0,0 @@ -SERVICE_NAME=AliDip2BK -PATH_TO_ALI=`pwd` -PID_PATH_NAME=$PATH_TO_ALI/AliDip2BK.pid - if [ -f $PID_PATH_NAME ]; then - PID=$(cat $PID_PATH_NAME); - echo "$SERVICE_NAME stoping ..." - kill $PID; - echo "$SERVICE_NAME stopped ..." - rm $PID_PATH_NAME - else - echo "$SERVICE_NAME is not running ..." - fi diff --git a/sysAD2BK.sh b/sysAD2BK.sh deleted file mode 100755 index e0f47b0..0000000 --- a/sysAD2BK.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -BASE=`pwd` -DATE=`date +%d-%m-%y` -LOG_FILE=$BASE/LOG_${DATE}.txt -export LD_LIBRARY_PATH=$BASE/lib64 -java -Dorg.slf4j.simpleLogger.defaultLogLevel=error -classpath $BASE/lib64/dip-jni.nar:$BASE/lib/*:$BASE/AliDip2BK.jar:.: alice.dip.AliDip2BK >>$LOG_FILE 2>&1 &