All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.ydb.proto.coordination.SemaphoreSession Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: protos/ydb_coordination.proto

package tech.ydb.proto.coordination;

/**
 * 
 **
 * Describes an owner or a waiter of this semaphore
 * 
* * Protobuf type {@code Ydb.Coordination.SemaphoreSession} */ public final class SemaphoreSession extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Ydb.Coordination.SemaphoreSession) SemaphoreSessionOrBuilder { private static final long serialVersionUID = 0L; // Use SemaphoreSession.newBuilder() to construct. private SemaphoreSession(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SemaphoreSession() { data_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new SemaphoreSession(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SemaphoreSession_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SemaphoreSession_fieldAccessorTable .ensureFieldAccessorsInitialized( tech.ydb.proto.coordination.SemaphoreSession.class, tech.ydb.proto.coordination.SemaphoreSession.Builder.class); } public static final int ORDER_ID_FIELD_NUMBER = 5; private long orderId_ = 0L; /** *
   * A monotonically increasing id which determines locking order
   * 
* * uint64 order_id = 5; * @return The orderId. */ @java.lang.Override public long getOrderId() { return orderId_; } public static final int SESSION_ID_FIELD_NUMBER = 1; private long sessionId_ = 0L; /** *
   * An id of the session which tried to acquire the semaphore
   * 
* * uint64 session_id = 1; * @return The sessionId. */ @java.lang.Override public long getSessionId() { return sessionId_; } public static final int TIMEOUT_MILLIS_FIELD_NUMBER = 2; private long timeoutMillis_ = 0L; /** *
   * A timeout in milliseconds for operation in waiters queue
   * 
* * uint64 timeout_millis = 2; * @return The timeoutMillis. */ @java.lang.Override public long getTimeoutMillis() { return timeoutMillis_; } public static final int COUNT_FIELD_NUMBER = 3; private long count_ = 0L; /** *
   * Number of tokens for an acquire operation
   * 
* * uint64 count = 3; * @return The count. */ @java.lang.Override public long getCount() { return count_; } public static final int DATA_FIELD_NUMBER = 4; private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** *
   * User-defined data attached to the acquire operation
   * 
* * bytes data = 4; * @return The data. */ @java.lang.Override public com.google.protobuf.ByteString getData() { return data_; } 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 (sessionId_ != 0L) { output.writeUInt64(1, sessionId_); } if (timeoutMillis_ != 0L) { output.writeUInt64(2, timeoutMillis_); } if (count_ != 0L) { output.writeUInt64(3, count_); } if (!data_.isEmpty()) { output.writeBytes(4, data_); } if (orderId_ != 0L) { output.writeUInt64(5, orderId_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (sessionId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, sessionId_); } if (timeoutMillis_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, timeoutMillis_); } if (count_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, count_); } if (!data_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, data_); } if (orderId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(5, orderId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof tech.ydb.proto.coordination.SemaphoreSession)) { return super.equals(obj); } tech.ydb.proto.coordination.SemaphoreSession other = (tech.ydb.proto.coordination.SemaphoreSession) obj; if (getOrderId() != other.getOrderId()) return false; if (getSessionId() != other.getSessionId()) return false; if (getTimeoutMillis() != other.getTimeoutMillis()) return false; if (getCount() != other.getCount()) return false; if (!getData() .equals(other.getData())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ORDER_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getOrderId()); hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSessionId()); hash = (37 * hash) + TIMEOUT_MILLIS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTimeoutMillis()); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCount()); hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tech.ydb.proto.coordination.SemaphoreSession parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tech.ydb.proto.coordination.SemaphoreSession 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 tech.ydb.proto.coordination.SemaphoreSession parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tech.ydb.proto.coordination.SemaphoreSession 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 tech.ydb.proto.coordination.SemaphoreSession parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tech.ydb.proto.coordination.SemaphoreSession 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(tech.ydb.proto.coordination.SemaphoreSession 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; } /** *
   **
   * Describes an owner or a waiter of this semaphore
   * 
* * Protobuf type {@code Ydb.Coordination.SemaphoreSession} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:Ydb.Coordination.SemaphoreSession) tech.ydb.proto.coordination.SemaphoreSessionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SemaphoreSession_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SemaphoreSession_fieldAccessorTable .ensureFieldAccessorsInitialized( tech.ydb.proto.coordination.SemaphoreSession.class, tech.ydb.proto.coordination.SemaphoreSession.Builder.class); } // Construct using tech.ydb.proto.coordination.SemaphoreSession.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; orderId_ = 0L; sessionId_ = 0L; timeoutMillis_ = 0L; count_ = 0L; data_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tech.ydb.proto.coordination.CoordinationProtos.internal_static_Ydb_Coordination_SemaphoreSession_descriptor; } @java.lang.Override public tech.ydb.proto.coordination.SemaphoreSession getDefaultInstanceForType() { return tech.ydb.proto.coordination.SemaphoreSession.getDefaultInstance(); } @java.lang.Override public tech.ydb.proto.coordination.SemaphoreSession build() { tech.ydb.proto.coordination.SemaphoreSession result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tech.ydb.proto.coordination.SemaphoreSession buildPartial() { tech.ydb.proto.coordination.SemaphoreSession result = new tech.ydb.proto.coordination.SemaphoreSession(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(tech.ydb.proto.coordination.SemaphoreSession result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.orderId_ = orderId_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.sessionId_ = sessionId_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.timeoutMillis_ = timeoutMillis_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.count_ = count_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.data_ = data_; } } @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 tech.ydb.proto.coordination.SemaphoreSession) { return mergeFrom((tech.ydb.proto.coordination.SemaphoreSession)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tech.ydb.proto.coordination.SemaphoreSession other) { if (other == tech.ydb.proto.coordination.SemaphoreSession.getDefaultInstance()) return this; if (other.getOrderId() != 0L) { setOrderId(other.getOrderId()); } if (other.getSessionId() != 0L) { setSessionId(other.getSessionId()); } if (other.getTimeoutMillis() != 0L) { setTimeoutMillis(other.getTimeoutMillis()); } if (other.getCount() != 0L) { setCount(other.getCount()); } if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { sessionId_ = input.readUInt64(); bitField0_ |= 0x00000002; break; } // case 8 case 16: { timeoutMillis_ = input.readUInt64(); bitField0_ |= 0x00000004; break; } // case 16 case 24: { count_ = input.readUInt64(); bitField0_ |= 0x00000008; break; } // case 24 case 34: { data_ = input.readBytes(); bitField0_ |= 0x00000010; break; } // case 34 case 40: { orderId_ = input.readUInt64(); bitField0_ |= 0x00000001; break; } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long orderId_ ; /** *
     * A monotonically increasing id which determines locking order
     * 
* * uint64 order_id = 5; * @return The orderId. */ @java.lang.Override public long getOrderId() { return orderId_; } /** *
     * A monotonically increasing id which determines locking order
     * 
* * uint64 order_id = 5; * @param value The orderId to set. * @return This builder for chaining. */ public Builder setOrderId(long value) { orderId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * A monotonically increasing id which determines locking order
     * 
* * uint64 order_id = 5; * @return This builder for chaining. */ public Builder clearOrderId() { bitField0_ = (bitField0_ & ~0x00000001); orderId_ = 0L; onChanged(); return this; } private long sessionId_ ; /** *
     * An id of the session which tried to acquire the semaphore
     * 
* * uint64 session_id = 1; * @return The sessionId. */ @java.lang.Override public long getSessionId() { return sessionId_; } /** *
     * An id of the session which tried to acquire the semaphore
     * 
* * uint64 session_id = 1; * @param value The sessionId to set. * @return This builder for chaining. */ public Builder setSessionId(long value) { sessionId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * An id of the session which tried to acquire the semaphore
     * 
* * uint64 session_id = 1; * @return This builder for chaining. */ public Builder clearSessionId() { bitField0_ = (bitField0_ & ~0x00000002); sessionId_ = 0L; onChanged(); return this; } private long timeoutMillis_ ; /** *
     * A timeout in milliseconds for operation in waiters queue
     * 
* * uint64 timeout_millis = 2; * @return The timeoutMillis. */ @java.lang.Override public long getTimeoutMillis() { return timeoutMillis_; } /** *
     * A timeout in milliseconds for operation in waiters queue
     * 
* * uint64 timeout_millis = 2; * @param value The timeoutMillis to set. * @return This builder for chaining. */ public Builder setTimeoutMillis(long value) { timeoutMillis_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * A timeout in milliseconds for operation in waiters queue
     * 
* * uint64 timeout_millis = 2; * @return This builder for chaining. */ public Builder clearTimeoutMillis() { bitField0_ = (bitField0_ & ~0x00000004); timeoutMillis_ = 0L; onChanged(); return this; } private long count_ ; /** *
     * Number of tokens for an acquire operation
     * 
* * uint64 count = 3; * @return The count. */ @java.lang.Override public long getCount() { return count_; } /** *
     * Number of tokens for an acquire operation
     * 
* * uint64 count = 3; * @param value The count to set. * @return This builder for chaining. */ public Builder setCount(long value) { count_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Number of tokens for an acquire operation
     * 
* * uint64 count = 3; * @return This builder for chaining. */ public Builder clearCount() { bitField0_ = (bitField0_ & ~0x00000008); count_ = 0L; onChanged(); return this; } private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** *
     * User-defined data attached to the acquire operation
     * 
* * bytes data = 4; * @return The data. */ @java.lang.Override public com.google.protobuf.ByteString getData() { return data_; } /** *
     * User-defined data attached to the acquire operation
     * 
* * bytes data = 4; * @param value The data to set. * @return This builder for chaining. */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } data_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * User-defined data attached to the acquire operation
     * 
* * bytes data = 4; * @return This builder for chaining. */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000010); data_ = getDefaultInstance().getData(); 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:Ydb.Coordination.SemaphoreSession) } // @@protoc_insertion_point(class_scope:Ydb.Coordination.SemaphoreSession) private static final tech.ydb.proto.coordination.SemaphoreSession DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tech.ydb.proto.coordination.SemaphoreSession(); } public static tech.ydb.proto.coordination.SemaphoreSession getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SemaphoreSession parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tech.ydb.proto.coordination.SemaphoreSession getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy