From 90525bdec393a94dbcbc2294a9c0fb741bb22e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bone=CC=81r?= Date: Fri, 9 Sep 2011 14:33:35 +0200 Subject: [PATCH 1/3] Created NetworkEventStream Channel and Listener - an event bus for remote and cluster life-cycle events. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Bonér --- .../akka/cluster/NetworkEventStream.scala | 74 ++++++++ .../akka/cluster/RemoteFailureDetector.scala | 168 ++++-------------- 2 files changed, 105 insertions(+), 137 deletions(-) create mode 100644 akka-remote/src/main/scala/akka/cluster/NetworkEventStream.scala diff --git a/akka-remote/src/main/scala/akka/cluster/NetworkEventStream.scala b/akka-remote/src/main/scala/akka/cluster/NetworkEventStream.scala new file mode 100644 index 0000000000..1b1b7d2f7e --- /dev/null +++ b/akka-remote/src/main/scala/akka/cluster/NetworkEventStream.scala @@ -0,0 +1,74 @@ +/** + * Copyright (C) 2009-2011 Typesafe Inc. + */ + +package akka.cluster + +import akka.actor.{ Actor, ActorRef, Props } +import Actor._ +import akka.dispatch.PinnedDispatcher + +import scala.collection.mutable + +import java.net.InetSocketAddress + +/** + * Stream of all kinds of network events, remote failure and connection events, cluster failure and connection events etc. + * Also provides API for channel listener management. + */ +object NetworkEventStream { + + private sealed trait NetworkEventStreamEvent + + private case class Register(listener: Listener, connectionAddress: InetSocketAddress) + extends NetworkEventStreamEvent + + private case class Unregister(listener: Listener, connectionAddress: InetSocketAddress) + extends NetworkEventStreamEvent + + /** + * Base trait for network event listener. + */ + trait Listener { + def notify(event: RemoteLifeCycleEvent) + } + + /** + * Channel actor with a registry of listeners. + */ + private class Channel extends Actor { + + val listeners = new mutable.HashMap[InetSocketAddress, mutable.Set[Listener]]() { + override def default(k: InetSocketAddress) = mutable.Set.empty[Listener] + } + + def receive = { + case event: RemoteClientLifeCycleEvent ⇒ + listeners(event.remoteAddress) foreach (_ notify event) + + case event: RemoteServerLifeCycleEvent ⇒ // FIXME handle RemoteServerLifeCycleEvent + + case Register(listener, connectionAddress) ⇒ + listeners(connectionAddress) += listener + + case Unregister(listener, connectionAddress) ⇒ + listeners(connectionAddress) -= listener + + case _ ⇒ //ignore other + } + } + + private[akka] val channel = actorOf(Props(new Channel).copy(dispatcher = new PinnedDispatcher(), localOnly = true)) + + /** + * Registers a network event stream listener (asyncronously). + */ + def register(listener: Listener, connectionAddress: InetSocketAddress) = + channel ! Register(listener, connectionAddress) + + /** + * Unregisters a network event stream listener (asyncronously) . + */ + def unregister(listener: Listener, connectionAddress: InetSocketAddress) = + channel ! Unregister(listener, connectionAddress) +} diff --git a/akka-remote/src/main/scala/akka/cluster/RemoteFailureDetector.scala b/akka-remote/src/main/scala/akka/cluster/RemoteFailureDetector.scala index 09cf65d88c..67eb7971c8 100644 --- a/akka-remote/src/main/scala/akka/cluster/RemoteFailureDetector.scala +++ b/akka-remote/src/main/scala/akka/cluster/RemoteFailureDetector.scala @@ -9,7 +9,6 @@ import Actor._ import akka.cluster._ import akka.routing._ import akka.event.EventHandler -import akka.dispatch.{ Dispatchers, Future, PinnedDispatcher } import akka.util.{ ListenerManagement, Duration } import scala.collection.immutable.Map @@ -20,58 +19,12 @@ import java.net.InetSocketAddress import java.util.concurrent.atomic.AtomicReference import System.{ currentTimeMillis ⇒ newTimestamp } -/** - * Holds error event channel Actor instance and provides API for channel listener management. - */ -object RemoteFailureDetector { - - private sealed trait RemoteFailureDetectorChannelEvent - - private case class Register(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) - extends RemoteFailureDetectorChannelEvent - - private case class Unregister(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) - extends RemoteFailureDetectorChannelEvent - - private[akka] val channel = actorOf(Props(new Channel).copy(dispatcher = new PinnedDispatcher(), localOnly = true)) - - def register(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) = - channel ! Register(listener, connectionAddress) - - def unregister(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) = - channel ! Unregister(listener, connectionAddress) - - private class Channel extends Actor { - - val listeners = new mutable.HashMap[InetSocketAddress, mutable.Set[RemoteFailureListener]]() { - override def default(k: InetSocketAddress) = mutable.Set.empty[RemoteFailureListener] - } - - def receive = { - case event: RemoteClientLifeCycleEvent ⇒ - listeners(event.remoteAddress) foreach (_ notify event) - - case event: RemoteServerLifeCycleEvent ⇒ // FIXME handle RemoteServerLifeCycleEvent - - case Register(listener, connectionAddress) ⇒ - listeners(connectionAddress) += listener - - case Unregister(listener, connectionAddress) ⇒ - listeners(connectionAddress) -= listener - - case _ ⇒ //ignore other - } - } -} - /** * Base class for remote failure detection management. */ abstract class RemoteFailureDetectorBase(initialConnections: Map[InetSocketAddress, ActorRef]) extends FailureDetector - with RemoteFailureListener { - - // import ClusterActorRef._ + with NetworkEventStream.Listener { type T <: AnyRef @@ -90,7 +43,7 @@ abstract class RemoteFailureDetectorBase(initialConnections: Map[InetSocketAddre } /** - * State factory. To be defined by subclass that wants to add extra info in the 'meta: Option[T]' field. + * State factory. To be defined by subclass that wants to add extra info in the 'meta: T' field. */ protected def newState(): State @@ -198,21 +151,20 @@ class RemoveConnectionOnFirstFailureRemoteFailureDetector( def recordFailure(connectionAddress: InetSocketAddress, timestamp: Long) {} - override def remoteClientWriteFailed( - request: AnyRef, cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } + def notify(event: RemoteLifeCycleEvent) = event match { + case RemoteClientWriteFailed(request, cause, client, connectionAddress) ⇒ + removeConnection(connectionAddress) - override def remoteClientError(cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } + case RemoteClientError(cause, client, connectionAddress) ⇒ + removeConnection(connectionAddress) - override def remoteClientDisconnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } + case RemoteClientDisconnected(client, connectionAddress) ⇒ + removeConnection(connectionAddress) - override def remoteClientShutdown(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) + case RemoteClientShutdown(client, connectionAddress) ⇒ + removeConnection(connectionAddress) + + case _ ⇒ {} } private def removeConnection(connectionAddress: InetSocketAddress) = @@ -290,39 +242,36 @@ class BannagePeriodFailureDetector( } // =================================================================================== - // RemoteFailureListener callbacks + // NetworkEventStream.Listener callback // =================================================================================== - override def remoteClientStarted(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordSuccess(connectionAddress, newTimestamp) - } + def notify(event: RemoteLifeCycleEvent) = event match { + case RemoteClientStarted(client, connectionAddress) ⇒ + recordSuccess(connectionAddress, newTimestamp) - override def remoteClientConnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordSuccess(connectionAddress, newTimestamp) - } + case RemoteClientConnected(client, connectionAddress) ⇒ + recordSuccess(connectionAddress, newTimestamp) - override def remoteClientWriteFailed( - request: AnyRef, cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } + case RemoteClientWriteFailed(request, cause, client, connectionAddress) ⇒ + recordFailure(connectionAddress, newTimestamp) - override def remoteClientError(cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } + case RemoteClientError(cause, client, connectionAddress) ⇒ + recordFailure(connectionAddress, newTimestamp) - override def remoteClientDisconnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } + case RemoteClientDisconnected(client, connectionAddress) ⇒ + recordFailure(connectionAddress, newTimestamp) - override def remoteClientShutdown(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) + case RemoteClientShutdown(client, connectionAddress) ⇒ + recordFailure(connectionAddress, newTimestamp) + + case _ ⇒ {} } } /** * Failure detector that uses the Circuit Breaker pattern to detect and recover from failing connections. * - * class CircuitBreakerRemoteFailureListener(initialConnections: Map[InetSocketAddress, ActorRef]) + * class CircuitBreakerNetworkEventStream.Listener(initialConnections: Map[InetSocketAddress, ActorRef]) * extends RemoteFailureDetectorBase(initialConnections) { * * def newState() = State(Long.MinValue, initialConnections, None) @@ -333,61 +282,6 @@ class BannagePeriodFailureDetector( * * def recordFailure(connectionAddress: InetSocketAddress, timestamp: Long) {} * - * // FIXME implement CircuitBreakerRemoteFailureListener + * // FIXME implement CircuitBreakerNetworkEventStream.Listener * } */ - -/** - * Base trait for remote failure event listener. - */ -trait RemoteFailureListener { - - final private[akka] def notify(event: RemoteLifeCycleEvent) = event match { - case RemoteClientStarted(client, connectionAddress) ⇒ - remoteClientStarted(client, connectionAddress) - - case RemoteClientConnected(client, connectionAddress) ⇒ - remoteClientConnected(client, connectionAddress) - - case RemoteClientWriteFailed(request, cause, client, connectionAddress) ⇒ - remoteClientWriteFailed(request, cause, client, connectionAddress) - - case RemoteClientError(cause, client, connectionAddress) ⇒ - remoteClientError(cause, client, connectionAddress) - - case RemoteClientDisconnected(client, connectionAddress) ⇒ - remoteClientDisconnected(client, connectionAddress) - - case RemoteClientShutdown(client, connectionAddress) ⇒ - remoteClientShutdown(client, connectionAddress) - - case RemoteServerWriteFailed(request, cause, server, clientAddress) ⇒ - remoteServerWriteFailed(request, cause, server, clientAddress) - - case RemoteServerError(cause, server) ⇒ - remoteServerError(cause, server) - - case RemoteServerShutdown(server) ⇒ - remoteServerShutdown(server) - } - - def remoteClientStarted(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientConnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientWriteFailed( - request: AnyRef, cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientError(cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientDisconnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientShutdown(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteServerWriteFailed( - request: AnyRef, cause: Throwable, server: RemoteServerModule, clientAddress: Option[InetSocketAddress]) {} - - def remoteServerError(cause: Throwable, server: RemoteServerModule) {} - - def remoteServerShutdown(server: RemoteServerModule) {} -} From a4c74f1ed9826d4da6299c0932b60e5ebd38cf8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bone=CC=81r?= Date: Fri, 9 Sep 2011 14:34:31 +0200 Subject: [PATCH 2/3] Added akka.sublime-workspace to .gitignore. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Bonér --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4b32362caf..4052098935 100755 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,5 @@ akka-docs/exts/ _akka_cluster/ Makefile akka.sublime-project +akka.sublime-workspace .target \ No newline at end of file From 358d2b1e0b88003367b8f0688c4bd4132fd6b3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bone=CC=81r?= Date: Fri, 9 Sep 2011 14:40:16 +0200 Subject: [PATCH 3/3] Removed all files that were moved to akka-remote. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Bonér --- .../java/akka/cluster/RemoteProtocol.java | 10788 ---------------- .../src/main/protocol/RemoteProtocol.proto | 230 - .../cluster/BootableRemoteActorService.scala | 42 - .../akka/cluster/MessageSerializer.scala | 32 - .../scala/akka/cluster/RemoteConfig.scala | 67 - .../akka/cluster/RemoteFailureDetector.scala | 389 - .../cluster/netty/NettyRemoteSupport.scala | 1152 -- .../src/main/scala/akka/cluster/untitled | 41 - .../src/main/scala/akka/package.scala | 13 - .../akka/serialization/Compression.scala | 21 - .../serialization/SerializationProtocol.scala | 361 - .../scala/akka/cluster/ClusterTestNode.scala | 116 - .../akka/cluster/MasterClusterTestNode.scala | 31 - .../scala/akka/cluster/QuietReporter.scala | 20 - .../java/akka/actor/ProtobufProtocol.java | 565 - .../src/test/protocol/ProtobufProtocol.proto | 18 - .../src/test/resources/log4j.properties | 58 - .../src/test/resources/logback-test.xml | 26 - akka-cluster/src/test/resources/zoo.cfg | 12 - .../akka/cluster/NetworkFailureSpec.scala | 102 - .../serialization/ActorSerializeSpec.scala | 152 - 21 files changed, 14236 deletions(-) delete mode 100644 akka-cluster/src/main/java/akka/cluster/RemoteProtocol.java delete mode 100644 akka-cluster/src/main/protocol/RemoteProtocol.proto delete mode 100644 akka-cluster/src/main/scala/akka/cluster/BootableRemoteActorService.scala delete mode 100644 akka-cluster/src/main/scala/akka/cluster/MessageSerializer.scala delete mode 100644 akka-cluster/src/main/scala/akka/cluster/RemoteConfig.scala delete mode 100644 akka-cluster/src/main/scala/akka/cluster/RemoteFailureDetector.scala delete mode 100644 akka-cluster/src/main/scala/akka/cluster/netty/NettyRemoteSupport.scala delete mode 100644 akka-cluster/src/main/scala/akka/cluster/untitled delete mode 100644 akka-cluster/src/main/scala/akka/package.scala delete mode 100644 akka-cluster/src/main/scala/akka/serialization/Compression.scala delete mode 100644 akka-cluster/src/main/scala/akka/serialization/SerializationProtocol.scala delete mode 100644 akka-cluster/src/multi-jvm/scala/akka/cluster/ClusterTestNode.scala delete mode 100644 akka-cluster/src/multi-jvm/scala/akka/cluster/MasterClusterTestNode.scala delete mode 100644 akka-cluster/src/multi-jvm/scala/akka/cluster/QuietReporter.scala delete mode 100644 akka-cluster/src/test/java/akka/actor/ProtobufProtocol.java delete mode 100644 akka-cluster/src/test/protocol/ProtobufProtocol.proto delete mode 100644 akka-cluster/src/test/resources/log4j.properties delete mode 100644 akka-cluster/src/test/resources/logback-test.xml delete mode 100644 akka-cluster/src/test/resources/zoo.cfg delete mode 100644 akka-cluster/src/test/scala/akka/cluster/NetworkFailureSpec.scala delete mode 100644 akka-cluster/src/test/scala/akka/serialization/ActorSerializeSpec.scala diff --git a/akka-cluster/src/main/java/akka/cluster/RemoteProtocol.java b/akka-cluster/src/main/java/akka/cluster/RemoteProtocol.java deleted file mode 100644 index 5db4c0f892..0000000000 --- a/akka-cluster/src/main/java/akka/cluster/RemoteProtocol.java +++ /dev/null @@ -1,10788 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: RemoteProtocol.proto - -package akka.cluster; - -public final class RemoteProtocol { - private RemoteProtocol() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public enum CommandType - implements com.google.protobuf.ProtocolMessageEnum { - CONNECT(0, 1), - SHUTDOWN(1, 2), - ; - - public static final int CONNECT_VALUE = 1; - public static final int SHUTDOWN_VALUE = 2; - - - public final int getNumber() { return value; } - - public static CommandType valueOf(int value) { - switch (value) { - case 1: return CONNECT; - case 2: return SHUTDOWN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public CommandType findValueByNumber(int number) { - return CommandType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.getDescriptor().getEnumTypes().get(0); - } - - private static final CommandType[] VALUES = { - CONNECT, SHUTDOWN, - }; - - public static CommandType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private CommandType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:CommandType) - } - - public enum ReplicationStorageType - implements com.google.protobuf.ProtocolMessageEnum { - TRANSIENT(0, 1), - TRANSACTION_LOG(1, 2), - DATA_GRID(2, 3), - ; - - public static final int TRANSIENT_VALUE = 1; - public static final int TRANSACTION_LOG_VALUE = 2; - public static final int DATA_GRID_VALUE = 3; - - - public final int getNumber() { return value; } - - public static ReplicationStorageType valueOf(int value) { - switch (value) { - case 1: return TRANSIENT; - case 2: return TRANSACTION_LOG; - case 3: return DATA_GRID; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReplicationStorageType findValueByNumber(int number) { - return ReplicationStorageType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.getDescriptor().getEnumTypes().get(1); - } - - private static final ReplicationStorageType[] VALUES = { - TRANSIENT, TRANSACTION_LOG, DATA_GRID, - }; - - public static ReplicationStorageType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private ReplicationStorageType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:ReplicationStorageType) - } - - public enum ReplicationStrategyType - implements com.google.protobuf.ProtocolMessageEnum { - WRITE_THROUGH(0, 1), - WRITE_BEHIND(1, 2), - ; - - public static final int WRITE_THROUGH_VALUE = 1; - public static final int WRITE_BEHIND_VALUE = 2; - - - public final int getNumber() { return value; } - - public static ReplicationStrategyType valueOf(int value) { - switch (value) { - case 1: return WRITE_THROUGH; - case 2: return WRITE_BEHIND; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReplicationStrategyType findValueByNumber(int number) { - return ReplicationStrategyType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.getDescriptor().getEnumTypes().get(2); - } - - private static final ReplicationStrategyType[] VALUES = { - WRITE_THROUGH, WRITE_BEHIND, - }; - - public static ReplicationStrategyType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private ReplicationStrategyType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:ReplicationStrategyType) - } - - public enum SerializationSchemeType - implements com.google.protobuf.ProtocolMessageEnum { - JAVA(0, 1), - SBINARY(1, 2), - SCALA_JSON(2, 3), - JAVA_JSON(3, 4), - PROTOBUF(4, 5), - ; - - public static final int JAVA_VALUE = 1; - public static final int SBINARY_VALUE = 2; - public static final int SCALA_JSON_VALUE = 3; - public static final int JAVA_JSON_VALUE = 4; - public static final int PROTOBUF_VALUE = 5; - - - public final int getNumber() { return value; } - - public static SerializationSchemeType valueOf(int value) { - switch (value) { - case 1: return JAVA; - case 2: return SBINARY; - case 3: return SCALA_JSON; - case 4: return JAVA_JSON; - case 5: return PROTOBUF; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SerializationSchemeType findValueByNumber(int number) { - return SerializationSchemeType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.getDescriptor().getEnumTypes().get(3); - } - - private static final SerializationSchemeType[] VALUES = { - JAVA, SBINARY, SCALA_JSON, JAVA_JSON, PROTOBUF, - }; - - public static SerializationSchemeType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private SerializationSchemeType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:SerializationSchemeType) - } - - public enum LifeCycleType - implements com.google.protobuf.ProtocolMessageEnum { - PERMANENT(0, 1), - TEMPORARY(1, 2), - ; - - public static final int PERMANENT_VALUE = 1; - public static final int TEMPORARY_VALUE = 2; - - - public final int getNumber() { return value; } - - public static LifeCycleType valueOf(int value) { - switch (value) { - case 1: return PERMANENT; - case 2: return TEMPORARY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LifeCycleType findValueByNumber(int number) { - return LifeCycleType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.getDescriptor().getEnumTypes().get(4); - } - - private static final LifeCycleType[] VALUES = { - PERMANENT, TEMPORARY, - }; - - public static LifeCycleType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private LifeCycleType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:LifeCycleType) - } - - public enum RemoteDaemonMessageType - implements com.google.protobuf.ProtocolMessageEnum { - STOP(0, 1), - USE(1, 2), - RELEASE(2, 3), - MAKE_AVAILABLE(3, 4), - MAKE_UNAVAILABLE(4, 5), - DISCONNECT(5, 6), - RECONNECT(6, 7), - RESIGN(7, 8), - FAIL_OVER_CONNECTIONS(8, 9), - FUNCTION_FUN0_UNIT(9, 10), - FUNCTION_FUN0_ANY(10, 11), - FUNCTION_FUN1_ARG_UNIT(11, 12), - FUNCTION_FUN1_ARG_ANY(12, 13), - ; - - public static final int STOP_VALUE = 1; - public static final int USE_VALUE = 2; - public static final int RELEASE_VALUE = 3; - public static final int MAKE_AVAILABLE_VALUE = 4; - public static final int MAKE_UNAVAILABLE_VALUE = 5; - public static final int DISCONNECT_VALUE = 6; - public static final int RECONNECT_VALUE = 7; - public static final int RESIGN_VALUE = 8; - public static final int FAIL_OVER_CONNECTIONS_VALUE = 9; - public static final int FUNCTION_FUN0_UNIT_VALUE = 10; - public static final int FUNCTION_FUN0_ANY_VALUE = 11; - public static final int FUNCTION_FUN1_ARG_UNIT_VALUE = 12; - public static final int FUNCTION_FUN1_ARG_ANY_VALUE = 13; - - - public final int getNumber() { return value; } - - public static RemoteDaemonMessageType valueOf(int value) { - switch (value) { - case 1: return STOP; - case 2: return USE; - case 3: return RELEASE; - case 4: return MAKE_AVAILABLE; - case 5: return MAKE_UNAVAILABLE; - case 6: return DISCONNECT; - case 7: return RECONNECT; - case 8: return RESIGN; - case 9: return FAIL_OVER_CONNECTIONS; - case 10: return FUNCTION_FUN0_UNIT; - case 11: return FUNCTION_FUN0_ANY; - case 12: return FUNCTION_FUN1_ARG_UNIT; - case 13: return FUNCTION_FUN1_ARG_ANY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RemoteDaemonMessageType findValueByNumber(int number) { - return RemoteDaemonMessageType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.getDescriptor().getEnumTypes().get(5); - } - - private static final RemoteDaemonMessageType[] VALUES = { - STOP, USE, RELEASE, MAKE_AVAILABLE, MAKE_UNAVAILABLE, DISCONNECT, RECONNECT, RESIGN, FAIL_OVER_CONNECTIONS, FUNCTION_FUN0_UNIT, FUNCTION_FUN0_ANY, FUNCTION_FUN1_ARG_UNIT, FUNCTION_FUN1_ARG_ANY, - }; - - public static RemoteDaemonMessageType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private RemoteDaemonMessageType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:RemoteDaemonMessageType) - } - - public interface AkkaRemoteProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional .RemoteMessageProtocol message = 1; - boolean hasMessage(); - akka.cluster.RemoteProtocol.RemoteMessageProtocol getMessage(); - akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder getMessageOrBuilder(); - - // optional .RemoteControlProtocol instruction = 2; - boolean hasInstruction(); - akka.cluster.RemoteProtocol.RemoteControlProtocol getInstruction(); - akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder getInstructionOrBuilder(); - } - public static final class AkkaRemoteProtocol extends - com.google.protobuf.GeneratedMessage - implements AkkaRemoteProtocolOrBuilder { - // Use AkkaRemoteProtocol.newBuilder() to construct. - private AkkaRemoteProtocol(Builder builder) { - super(builder); - } - private AkkaRemoteProtocol(boolean noInit) {} - - private static final AkkaRemoteProtocol defaultInstance; - public static AkkaRemoteProtocol getDefaultInstance() { - return defaultInstance; - } - - public AkkaRemoteProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_AkkaRemoteProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_AkkaRemoteProtocol_fieldAccessorTable; - } - - private int bitField0_; - // optional .RemoteMessageProtocol message = 1; - public static final int MESSAGE_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.RemoteMessageProtocol message_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol getMessage() { - return message_; - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder getMessageOrBuilder() { - return message_; - } - - // optional .RemoteControlProtocol instruction = 2; - public static final int INSTRUCTION_FIELD_NUMBER = 2; - private akka.cluster.RemoteProtocol.RemoteControlProtocol instruction_; - public boolean hasInstruction() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.RemoteControlProtocol getInstruction() { - return instruction_; - } - public akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder getInstructionOrBuilder() { - return instruction_; - } - - private void initFields() { - message_ = akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance(); - instruction_ = akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (hasMessage()) { - if (!getMessage().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasInstruction()) { - if (!getInstruction().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, message_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, instruction_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, message_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, instruction_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AkkaRemoteProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.AkkaRemoteProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.AkkaRemoteProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_AkkaRemoteProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_AkkaRemoteProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.AkkaRemoteProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getMessageFieldBuilder(); - getInstructionFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (messageBuilder_ == null) { - message_ = akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance(); - } else { - messageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (instructionBuilder_ == null) { - instruction_ = akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance(); - } else { - instructionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.AkkaRemoteProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.AkkaRemoteProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.AkkaRemoteProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.AkkaRemoteProtocol build() { - akka.cluster.RemoteProtocol.AkkaRemoteProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.AkkaRemoteProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.AkkaRemoteProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.AkkaRemoteProtocol buildPartial() { - akka.cluster.RemoteProtocol.AkkaRemoteProtocol result = new akka.cluster.RemoteProtocol.AkkaRemoteProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (messageBuilder_ == null) { - result.message_ = message_; - } else { - result.message_ = messageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (instructionBuilder_ == null) { - result.instruction_ = instruction_; - } else { - result.instruction_ = instructionBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.AkkaRemoteProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.AkkaRemoteProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.AkkaRemoteProtocol other) { - if (other == akka.cluster.RemoteProtocol.AkkaRemoteProtocol.getDefaultInstance()) return this; - if (other.hasMessage()) { - mergeMessage(other.getMessage()); - } - if (other.hasInstruction()) { - mergeInstruction(other.getInstruction()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (hasMessage()) { - if (!getMessage().isInitialized()) { - - return false; - } - } - if (hasInstruction()) { - if (!getInstruction().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.RemoteMessageProtocol.newBuilder(); - if (hasMessage()) { - subBuilder.mergeFrom(getMessage()); - } - input.readMessage(subBuilder, extensionRegistry); - setMessage(subBuilder.buildPartial()); - break; - } - case 18: { - akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.RemoteControlProtocol.newBuilder(); - if (hasInstruction()) { - subBuilder.mergeFrom(getInstruction()); - } - input.readMessage(subBuilder, extensionRegistry); - setInstruction(subBuilder.buildPartial()); - break; - } - } - } - } - - private int bitField0_; - - // optional .RemoteMessageProtocol message = 1; - private akka.cluster.RemoteProtocol.RemoteMessageProtocol message_ = akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteMessageProtocol, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder, akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder> messageBuilder_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol getMessage() { - if (messageBuilder_ == null) { - return message_; - } else { - return messageBuilder_.getMessage(); - } - } - public Builder setMessage(akka.cluster.RemoteProtocol.RemoteMessageProtocol value) { - if (messageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - message_ = value; - onChanged(); - } else { - messageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setMessage( - akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder builderForValue) { - if (messageBuilder_ == null) { - message_ = builderForValue.build(); - onChanged(); - } else { - messageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeMessage(akka.cluster.RemoteProtocol.RemoteMessageProtocol value) { - if (messageBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - message_ != akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance()) { - message_ = - akka.cluster.RemoteProtocol.RemoteMessageProtocol.newBuilder(message_).mergeFrom(value).buildPartial(); - } else { - message_ = value; - } - onChanged(); - } else { - messageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearMessage() { - if (messageBuilder_ == null) { - message_ = akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance(); - onChanged(); - } else { - messageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder getMessageBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getMessageFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder getMessageOrBuilder() { - if (messageBuilder_ != null) { - return messageBuilder_.getMessageOrBuilder(); - } else { - return message_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteMessageProtocol, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder, akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder> - getMessageFieldBuilder() { - if (messageBuilder_ == null) { - messageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteMessageProtocol, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder, akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder>( - message_, - getParentForChildren(), - isClean()); - message_ = null; - } - return messageBuilder_; - } - - // optional .RemoteControlProtocol instruction = 2; - private akka.cluster.RemoteProtocol.RemoteControlProtocol instruction_ = akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteControlProtocol, akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder, akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder> instructionBuilder_; - public boolean hasInstruction() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.RemoteControlProtocol getInstruction() { - if (instructionBuilder_ == null) { - return instruction_; - } else { - return instructionBuilder_.getMessage(); - } - } - public Builder setInstruction(akka.cluster.RemoteProtocol.RemoteControlProtocol value) { - if (instructionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instruction_ = value; - onChanged(); - } else { - instructionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setInstruction( - akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder builderForValue) { - if (instructionBuilder_ == null) { - instruction_ = builderForValue.build(); - onChanged(); - } else { - instructionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeInstruction(akka.cluster.RemoteProtocol.RemoteControlProtocol value) { - if (instructionBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - instruction_ != akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance()) { - instruction_ = - akka.cluster.RemoteProtocol.RemoteControlProtocol.newBuilder(instruction_).mergeFrom(value).buildPartial(); - } else { - instruction_ = value; - } - onChanged(); - } else { - instructionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearInstruction() { - if (instructionBuilder_ == null) { - instruction_ = akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance(); - onChanged(); - } else { - instructionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder getInstructionBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getInstructionFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder getInstructionOrBuilder() { - if (instructionBuilder_ != null) { - return instructionBuilder_.getMessageOrBuilder(); - } else { - return instruction_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteControlProtocol, akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder, akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder> - getInstructionFieldBuilder() { - if (instructionBuilder_ == null) { - instructionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteControlProtocol, akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder, akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder>( - instruction_, - getParentForChildren(), - isClean()); - instruction_ = null; - } - return instructionBuilder_; - } - - // @@protoc_insertion_point(builder_scope:AkkaRemoteProtocol) - } - - static { - defaultInstance = new AkkaRemoteProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:AkkaRemoteProtocol) - } - - public interface RemoteMessageProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .UuidProtocol uuid = 1; - boolean hasUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder(); - - // required .ActorInfoProtocol actorInfo = 2; - boolean hasActorInfo(); - akka.cluster.RemoteProtocol.ActorInfoProtocol getActorInfo(); - akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder getActorInfoOrBuilder(); - - // required bool oneWay = 3; - boolean hasOneWay(); - boolean getOneWay(); - - // optional .MessageProtocol message = 4; - boolean hasMessage(); - akka.cluster.RemoteProtocol.MessageProtocol getMessage(); - akka.cluster.RemoteProtocol.MessageProtocolOrBuilder getMessageOrBuilder(); - - // optional .ExceptionProtocol exception = 5; - boolean hasException(); - akka.cluster.RemoteProtocol.ExceptionProtocol getException(); - akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder getExceptionOrBuilder(); - - // optional .UuidProtocol supervisorUuid = 6; - boolean hasSupervisorUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getSupervisorUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getSupervisorUuidOrBuilder(); - - // optional .RemoteActorRefProtocol sender = 7; - boolean hasSender(); - akka.cluster.RemoteProtocol.RemoteActorRefProtocol getSender(); - akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder getSenderOrBuilder(); - - // repeated .MetadataEntryProtocol metadata = 8; - java.util.List - getMetadataList(); - akka.cluster.RemoteProtocol.MetadataEntryProtocol getMetadata(int index); - int getMetadataCount(); - java.util.List - getMetadataOrBuilderList(); - akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder getMetadataOrBuilder( - int index); - } - public static final class RemoteMessageProtocol extends - com.google.protobuf.GeneratedMessage - implements RemoteMessageProtocolOrBuilder { - // Use RemoteMessageProtocol.newBuilder() to construct. - private RemoteMessageProtocol(Builder builder) { - super(builder); - } - private RemoteMessageProtocol(boolean noInit) {} - - private static final RemoteMessageProtocol defaultInstance; - public static RemoteMessageProtocol getDefaultInstance() { - return defaultInstance; - } - - public RemoteMessageProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteMessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteMessageProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required .UuidProtocol uuid = 1; - public static final int UUID_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.UuidProtocol uuid_; - public boolean hasUuid() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.UuidProtocol getUuid() { - return uuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder() { - return uuid_; - } - - // required .ActorInfoProtocol actorInfo = 2; - public static final int ACTORINFO_FIELD_NUMBER = 2; - private akka.cluster.RemoteProtocol.ActorInfoProtocol actorInfo_; - public boolean hasActorInfo() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.ActorInfoProtocol getActorInfo() { - return actorInfo_; - } - public akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder getActorInfoOrBuilder() { - return actorInfo_; - } - - // required bool oneWay = 3; - public static final int ONEWAY_FIELD_NUMBER = 3; - private boolean oneWay_; - public boolean hasOneWay() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public boolean getOneWay() { - return oneWay_; - } - - // optional .MessageProtocol message = 4; - public static final int MESSAGE_FIELD_NUMBER = 4; - private akka.cluster.RemoteProtocol.MessageProtocol message_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public akka.cluster.RemoteProtocol.MessageProtocol getMessage() { - return message_; - } - public akka.cluster.RemoteProtocol.MessageProtocolOrBuilder getMessageOrBuilder() { - return message_; - } - - // optional .ExceptionProtocol exception = 5; - public static final int EXCEPTION_FIELD_NUMBER = 5; - private akka.cluster.RemoteProtocol.ExceptionProtocol exception_; - public boolean hasException() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public akka.cluster.RemoteProtocol.ExceptionProtocol getException() { - return exception_; - } - public akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder getExceptionOrBuilder() { - return exception_; - } - - // optional .UuidProtocol supervisorUuid = 6; - public static final int SUPERVISORUUID_FIELD_NUMBER = 6; - private akka.cluster.RemoteProtocol.UuidProtocol supervisorUuid_; - public boolean hasSupervisorUuid() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public akka.cluster.RemoteProtocol.UuidProtocol getSupervisorUuid() { - return supervisorUuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getSupervisorUuidOrBuilder() { - return supervisorUuid_; - } - - // optional .RemoteActorRefProtocol sender = 7; - public static final int SENDER_FIELD_NUMBER = 7; - private akka.cluster.RemoteProtocol.RemoteActorRefProtocol sender_; - public boolean hasSender() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol getSender() { - return sender_; - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder getSenderOrBuilder() { - return sender_; - } - - // repeated .MetadataEntryProtocol metadata = 8; - public static final int METADATA_FIELD_NUMBER = 8; - private java.util.List metadata_; - public java.util.List getMetadataList() { - return metadata_; - } - public java.util.List - getMetadataOrBuilderList() { - return metadata_; - } - public int getMetadataCount() { - return metadata_.size(); - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocol getMetadata(int index) { - return metadata_.get(index); - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder getMetadataOrBuilder( - int index) { - return metadata_.get(index); - } - - private void initFields() { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - actorInfo_ = akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance(); - oneWay_ = false; - message_ = akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance(); - exception_ = akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); - supervisorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - sender_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - metadata_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasUuid()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasActorInfo()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasOneWay()) { - memoizedIsInitialized = 0; - return false; - } - if (!getUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - if (!getActorInfo().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - if (hasMessage()) { - if (!getMessage().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasException()) { - if (!getException().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSupervisorUuid()) { - if (!getSupervisorUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSender()) { - if (!getSender().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getMetadataCount(); i++) { - if (!getMetadata(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, uuid_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, actorInfo_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(3, oneWay_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, message_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(5, exception_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeMessage(6, supervisorUuid_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeMessage(7, sender_); - } - for (int i = 0; i < metadata_.size(); i++) { - output.writeMessage(8, metadata_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, uuid_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, actorInfo_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, oneWay_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, message_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, exception_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, supervisorUuid_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, sender_); - } - for (int i = 0; i < metadata_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, metadata_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteMessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.RemoteMessageProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteMessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteMessageProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.RemoteMessageProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getUuidFieldBuilder(); - getActorInfoFieldBuilder(); - getMessageFieldBuilder(); - getExceptionFieldBuilder(); - getSupervisorUuidFieldBuilder(); - getSenderFieldBuilder(); - getMetadataFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (uuidBuilder_ == null) { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - uuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (actorInfoBuilder_ == null) { - actorInfo_ = akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance(); - } else { - actorInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - oneWay_ = false; - bitField0_ = (bitField0_ & ~0x00000004); - if (messageBuilder_ == null) { - message_ = akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance(); - } else { - messageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (exceptionBuilder_ == null) { - exception_ = akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); - } else { - exceptionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (supervisorUuidBuilder_ == null) { - supervisorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - supervisorUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - if (senderBuilder_ == null) { - sender_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - } else { - senderBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - if (metadataBuilder_ == null) { - metadata_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - } else { - metadataBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.RemoteMessageProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.RemoteMessageProtocol build() { - akka.cluster.RemoteProtocol.RemoteMessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.RemoteMessageProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.RemoteMessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.RemoteMessageProtocol buildPartial() { - akka.cluster.RemoteProtocol.RemoteMessageProtocol result = new akka.cluster.RemoteProtocol.RemoteMessageProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (uuidBuilder_ == null) { - result.uuid_ = uuid_; - } else { - result.uuid_ = uuidBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (actorInfoBuilder_ == null) { - result.actorInfo_ = actorInfo_; - } else { - result.actorInfo_ = actorInfoBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.oneWay_ = oneWay_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (messageBuilder_ == null) { - result.message_ = message_; - } else { - result.message_ = messageBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (exceptionBuilder_ == null) { - result.exception_ = exception_; - } else { - result.exception_ = exceptionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - if (supervisorUuidBuilder_ == null) { - result.supervisorUuid_ = supervisorUuid_; - } else { - result.supervisorUuid_ = supervisorUuidBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - if (senderBuilder_ == null) { - result.sender_ = sender_; - } else { - result.sender_ = senderBuilder_.build(); - } - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { - metadata_ = java.util.Collections.unmodifiableList(metadata_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.metadata_ = metadata_; - } else { - result.metadata_ = metadataBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.RemoteMessageProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.RemoteMessageProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.RemoteMessageProtocol other) { - if (other == akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance()) return this; - if (other.hasUuid()) { - mergeUuid(other.getUuid()); - } - if (other.hasActorInfo()) { - mergeActorInfo(other.getActorInfo()); - } - if (other.hasOneWay()) { - setOneWay(other.getOneWay()); - } - if (other.hasMessage()) { - mergeMessage(other.getMessage()); - } - if (other.hasException()) { - mergeException(other.getException()); - } - if (other.hasSupervisorUuid()) { - mergeSupervisorUuid(other.getSupervisorUuid()); - } - if (other.hasSender()) { - mergeSender(other.getSender()); - } - if (metadataBuilder_ == null) { - if (!other.metadata_.isEmpty()) { - if (metadata_.isEmpty()) { - metadata_ = other.metadata_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureMetadataIsMutable(); - metadata_.addAll(other.metadata_); - } - onChanged(); - } - } else { - if (!other.metadata_.isEmpty()) { - if (metadataBuilder_.isEmpty()) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - metadata_ = other.metadata_; - bitField0_ = (bitField0_ & ~0x00000080); - metadataBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMetadataFieldBuilder() : null; - } else { - metadataBuilder_.addAllMessages(other.metadata_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasUuid()) { - - return false; - } - if (!hasActorInfo()) { - - return false; - } - if (!hasOneWay()) { - - return false; - } - if (!getUuid().isInitialized()) { - - return false; - } - if (!getActorInfo().isInitialized()) { - - return false; - } - if (hasMessage()) { - if (!getMessage().isInitialized()) { - - return false; - } - } - if (hasException()) { - if (!getException().isInitialized()) { - - return false; - } - } - if (hasSupervisorUuid()) { - if (!getSupervisorUuid().isInitialized()) { - - return false; - } - } - if (hasSender()) { - if (!getSender().isInitialized()) { - - return false; - } - } - for (int i = 0; i < getMetadataCount(); i++) { - if (!getMetadata(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasUuid()) { - subBuilder.mergeFrom(getUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setUuid(subBuilder.buildPartial()); - break; - } - case 18: { - akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.ActorInfoProtocol.newBuilder(); - if (hasActorInfo()) { - subBuilder.mergeFrom(getActorInfo()); - } - input.readMessage(subBuilder, extensionRegistry); - setActorInfo(subBuilder.buildPartial()); - break; - } - case 24: { - bitField0_ |= 0x00000004; - oneWay_ = input.readBool(); - break; - } - case 34: { - akka.cluster.RemoteProtocol.MessageProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.MessageProtocol.newBuilder(); - if (hasMessage()) { - subBuilder.mergeFrom(getMessage()); - } - input.readMessage(subBuilder, extensionRegistry); - setMessage(subBuilder.buildPartial()); - break; - } - case 42: { - akka.cluster.RemoteProtocol.ExceptionProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.ExceptionProtocol.newBuilder(); - if (hasException()) { - subBuilder.mergeFrom(getException()); - } - input.readMessage(subBuilder, extensionRegistry); - setException(subBuilder.buildPartial()); - break; - } - case 50: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasSupervisorUuid()) { - subBuilder.mergeFrom(getSupervisorUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setSupervisorUuid(subBuilder.buildPartial()); - break; - } - case 58: { - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.newBuilder(); - if (hasSender()) { - subBuilder.mergeFrom(getSender()); - } - input.readMessage(subBuilder, extensionRegistry); - setSender(subBuilder.buildPartial()); - break; - } - case 66: { - akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.MetadataEntryProtocol.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addMetadata(subBuilder.buildPartial()); - break; - } - } - } - } - - private int bitField0_; - - // required .UuidProtocol uuid = 1; - private akka.cluster.RemoteProtocol.UuidProtocol uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> uuidBuilder_; - public boolean hasUuid() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.UuidProtocol getUuid() { - if (uuidBuilder_ == null) { - return uuid_; - } else { - return uuidBuilder_.getMessage(); - } - } - public Builder setUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (uuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - uuid_ = value; - onChanged(); - } else { - uuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (uuidBuilder_ == null) { - uuid_ = builderForValue.build(); - onChanged(); - } else { - uuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (uuidBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - uuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - uuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(uuid_).mergeFrom(value).buildPartial(); - } else { - uuid_ = value; - } - onChanged(); - } else { - uuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearUuid() { - if (uuidBuilder_ == null) { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - uuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getUuidBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder() { - if (uuidBuilder_ != null) { - return uuidBuilder_.getMessageOrBuilder(); - } else { - return uuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getUuidFieldBuilder() { - if (uuidBuilder_ == null) { - uuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - uuid_, - getParentForChildren(), - isClean()); - uuid_ = null; - } - return uuidBuilder_; - } - - // required .ActorInfoProtocol actorInfo = 2; - private akka.cluster.RemoteProtocol.ActorInfoProtocol actorInfo_ = akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.ActorInfoProtocol, akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder, akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder> actorInfoBuilder_; - public boolean hasActorInfo() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.ActorInfoProtocol getActorInfo() { - if (actorInfoBuilder_ == null) { - return actorInfo_; - } else { - return actorInfoBuilder_.getMessage(); - } - } - public Builder setActorInfo(akka.cluster.RemoteProtocol.ActorInfoProtocol value) { - if (actorInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - actorInfo_ = value; - onChanged(); - } else { - actorInfoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setActorInfo( - akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder builderForValue) { - if (actorInfoBuilder_ == null) { - actorInfo_ = builderForValue.build(); - onChanged(); - } else { - actorInfoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeActorInfo(akka.cluster.RemoteProtocol.ActorInfoProtocol value) { - if (actorInfoBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - actorInfo_ != akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance()) { - actorInfo_ = - akka.cluster.RemoteProtocol.ActorInfoProtocol.newBuilder(actorInfo_).mergeFrom(value).buildPartial(); - } else { - actorInfo_ = value; - } - onChanged(); - } else { - actorInfoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearActorInfo() { - if (actorInfoBuilder_ == null) { - actorInfo_ = akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance(); - onChanged(); - } else { - actorInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder getActorInfoBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getActorInfoFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder getActorInfoOrBuilder() { - if (actorInfoBuilder_ != null) { - return actorInfoBuilder_.getMessageOrBuilder(); - } else { - return actorInfo_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.ActorInfoProtocol, akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder, akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder> - getActorInfoFieldBuilder() { - if (actorInfoBuilder_ == null) { - actorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.ActorInfoProtocol, akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder, akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder>( - actorInfo_, - getParentForChildren(), - isClean()); - actorInfo_ = null; - } - return actorInfoBuilder_; - } - - // required bool oneWay = 3; - private boolean oneWay_ ; - public boolean hasOneWay() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public boolean getOneWay() { - return oneWay_; - } - public Builder setOneWay(boolean value) { - bitField0_ |= 0x00000004; - oneWay_ = value; - onChanged(); - return this; - } - public Builder clearOneWay() { - bitField0_ = (bitField0_ & ~0x00000004); - oneWay_ = false; - onChanged(); - return this; - } - - // optional .MessageProtocol message = 4; - private akka.cluster.RemoteProtocol.MessageProtocol message_ = akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.MessageProtocol, akka.cluster.RemoteProtocol.MessageProtocol.Builder, akka.cluster.RemoteProtocol.MessageProtocolOrBuilder> messageBuilder_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public akka.cluster.RemoteProtocol.MessageProtocol getMessage() { - if (messageBuilder_ == null) { - return message_; - } else { - return messageBuilder_.getMessage(); - } - } - public Builder setMessage(akka.cluster.RemoteProtocol.MessageProtocol value) { - if (messageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - message_ = value; - onChanged(); - } else { - messageBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setMessage( - akka.cluster.RemoteProtocol.MessageProtocol.Builder builderForValue) { - if (messageBuilder_ == null) { - message_ = builderForValue.build(); - onChanged(); - } else { - messageBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergeMessage(akka.cluster.RemoteProtocol.MessageProtocol value) { - if (messageBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - message_ != akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance()) { - message_ = - akka.cluster.RemoteProtocol.MessageProtocol.newBuilder(message_).mergeFrom(value).buildPartial(); - } else { - message_ = value; - } - onChanged(); - } else { - messageBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder clearMessage() { - if (messageBuilder_ == null) { - message_ = akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance(); - onChanged(); - } else { - messageBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public akka.cluster.RemoteProtocol.MessageProtocol.Builder getMessageBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getMessageFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.MessageProtocolOrBuilder getMessageOrBuilder() { - if (messageBuilder_ != null) { - return messageBuilder_.getMessageOrBuilder(); - } else { - return message_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.MessageProtocol, akka.cluster.RemoteProtocol.MessageProtocol.Builder, akka.cluster.RemoteProtocol.MessageProtocolOrBuilder> - getMessageFieldBuilder() { - if (messageBuilder_ == null) { - messageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.MessageProtocol, akka.cluster.RemoteProtocol.MessageProtocol.Builder, akka.cluster.RemoteProtocol.MessageProtocolOrBuilder>( - message_, - getParentForChildren(), - isClean()); - message_ = null; - } - return messageBuilder_; - } - - // optional .ExceptionProtocol exception = 5; - private akka.cluster.RemoteProtocol.ExceptionProtocol exception_ = akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.ExceptionProtocol, akka.cluster.RemoteProtocol.ExceptionProtocol.Builder, akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder> exceptionBuilder_; - public boolean hasException() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public akka.cluster.RemoteProtocol.ExceptionProtocol getException() { - if (exceptionBuilder_ == null) { - return exception_; - } else { - return exceptionBuilder_.getMessage(); - } - } - public Builder setException(akka.cluster.RemoteProtocol.ExceptionProtocol value) { - if (exceptionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - exception_ = value; - onChanged(); - } else { - exceptionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - return this; - } - public Builder setException( - akka.cluster.RemoteProtocol.ExceptionProtocol.Builder builderForValue) { - if (exceptionBuilder_ == null) { - exception_ = builderForValue.build(); - onChanged(); - } else { - exceptionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - return this; - } - public Builder mergeException(akka.cluster.RemoteProtocol.ExceptionProtocol value) { - if (exceptionBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - exception_ != akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance()) { - exception_ = - akka.cluster.RemoteProtocol.ExceptionProtocol.newBuilder(exception_).mergeFrom(value).buildPartial(); - } else { - exception_ = value; - } - onChanged(); - } else { - exceptionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - return this; - } - public Builder clearException() { - if (exceptionBuilder_ == null) { - exception_ = akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); - onChanged(); - } else { - exceptionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - public akka.cluster.RemoteProtocol.ExceptionProtocol.Builder getExceptionBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getExceptionFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder getExceptionOrBuilder() { - if (exceptionBuilder_ != null) { - return exceptionBuilder_.getMessageOrBuilder(); - } else { - return exception_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.ExceptionProtocol, akka.cluster.RemoteProtocol.ExceptionProtocol.Builder, akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder> - getExceptionFieldBuilder() { - if (exceptionBuilder_ == null) { - exceptionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.ExceptionProtocol, akka.cluster.RemoteProtocol.ExceptionProtocol.Builder, akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder>( - exception_, - getParentForChildren(), - isClean()); - exception_ = null; - } - return exceptionBuilder_; - } - - // optional .UuidProtocol supervisorUuid = 6; - private akka.cluster.RemoteProtocol.UuidProtocol supervisorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> supervisorUuidBuilder_; - public boolean hasSupervisorUuid() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public akka.cluster.RemoteProtocol.UuidProtocol getSupervisorUuid() { - if (supervisorUuidBuilder_ == null) { - return supervisorUuid_; - } else { - return supervisorUuidBuilder_.getMessage(); - } - } - public Builder setSupervisorUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (supervisorUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - supervisorUuid_ = value; - onChanged(); - } else { - supervisorUuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - return this; - } - public Builder setSupervisorUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (supervisorUuidBuilder_ == null) { - supervisorUuid_ = builderForValue.build(); - onChanged(); - } else { - supervisorUuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - return this; - } - public Builder mergeSupervisorUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (supervisorUuidBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020) && - supervisorUuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - supervisorUuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(supervisorUuid_).mergeFrom(value).buildPartial(); - } else { - supervisorUuid_ = value; - } - onChanged(); - } else { - supervisorUuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - return this; - } - public Builder clearSupervisorUuid() { - if (supervisorUuidBuilder_ == null) { - supervisorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - supervisorUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getSupervisorUuidBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getSupervisorUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getSupervisorUuidOrBuilder() { - if (supervisorUuidBuilder_ != null) { - return supervisorUuidBuilder_.getMessageOrBuilder(); - } else { - return supervisorUuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getSupervisorUuidFieldBuilder() { - if (supervisorUuidBuilder_ == null) { - supervisorUuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - supervisorUuid_, - getParentForChildren(), - isClean()); - supervisorUuid_ = null; - } - return supervisorUuidBuilder_; - } - - // optional .RemoteActorRefProtocol sender = 7; - private akka.cluster.RemoteProtocol.RemoteActorRefProtocol sender_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteActorRefProtocol, akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder, akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder> senderBuilder_; - public boolean hasSender() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol getSender() { - if (senderBuilder_ == null) { - return sender_; - } else { - return senderBuilder_.getMessage(); - } - } - public Builder setSender(akka.cluster.RemoteProtocol.RemoteActorRefProtocol value) { - if (senderBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sender_ = value; - onChanged(); - } else { - senderBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - return this; - } - public Builder setSender( - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder builderForValue) { - if (senderBuilder_ == null) { - sender_ = builderForValue.build(); - onChanged(); - } else { - senderBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - return this; - } - public Builder mergeSender(akka.cluster.RemoteProtocol.RemoteActorRefProtocol value) { - if (senderBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040) && - sender_ != akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) { - sender_ = - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.newBuilder(sender_).mergeFrom(value).buildPartial(); - } else { - sender_ = value; - } - onChanged(); - } else { - senderBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000040; - return this; - } - public Builder clearSender() { - if (senderBuilder_ == null) { - sender_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - onChanged(); - } else { - senderBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder getSenderBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getSenderFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder getSenderOrBuilder() { - if (senderBuilder_ != null) { - return senderBuilder_.getMessageOrBuilder(); - } else { - return sender_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteActorRefProtocol, akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder, akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder> - getSenderFieldBuilder() { - if (senderBuilder_ == null) { - senderBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteActorRefProtocol, akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder, akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder>( - sender_, - getParentForChildren(), - isClean()); - sender_ = null; - } - return senderBuilder_; - } - - // repeated .MetadataEntryProtocol metadata = 8; - private java.util.List metadata_ = - java.util.Collections.emptyList(); - private void ensureMetadataIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - metadata_ = new java.util.ArrayList(metadata_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - akka.cluster.RemoteProtocol.MetadataEntryProtocol, akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder, akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder> metadataBuilder_; - - public java.util.List getMetadataList() { - if (metadataBuilder_ == null) { - return java.util.Collections.unmodifiableList(metadata_); - } else { - return metadataBuilder_.getMessageList(); - } - } - public int getMetadataCount() { - if (metadataBuilder_ == null) { - return metadata_.size(); - } else { - return metadataBuilder_.getCount(); - } - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocol getMetadata(int index) { - if (metadataBuilder_ == null) { - return metadata_.get(index); - } else { - return metadataBuilder_.getMessage(index); - } - } - public Builder setMetadata( - int index, akka.cluster.RemoteProtocol.MetadataEntryProtocol value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataIsMutable(); - metadata_.set(index, value); - onChanged(); - } else { - metadataBuilder_.setMessage(index, value); - } - return this; - } - public Builder setMetadata( - int index, akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder builderForValue) { - if (metadataBuilder_ == null) { - ensureMetadataIsMutable(); - metadata_.set(index, builderForValue.build()); - onChanged(); - } else { - metadataBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addMetadata(akka.cluster.RemoteProtocol.MetadataEntryProtocol value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataIsMutable(); - metadata_.add(value); - onChanged(); - } else { - metadataBuilder_.addMessage(value); - } - return this; - } - public Builder addMetadata( - int index, akka.cluster.RemoteProtocol.MetadataEntryProtocol value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMetadataIsMutable(); - metadata_.add(index, value); - onChanged(); - } else { - metadataBuilder_.addMessage(index, value); - } - return this; - } - public Builder addMetadata( - akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder builderForValue) { - if (metadataBuilder_ == null) { - ensureMetadataIsMutable(); - metadata_.add(builderForValue.build()); - onChanged(); - } else { - metadataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addMetadata( - int index, akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder builderForValue) { - if (metadataBuilder_ == null) { - ensureMetadataIsMutable(); - metadata_.add(index, builderForValue.build()); - onChanged(); - } else { - metadataBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllMetadata( - java.lang.Iterable values) { - if (metadataBuilder_ == null) { - ensureMetadataIsMutable(); - super.addAll(values, metadata_); - onChanged(); - } else { - metadataBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearMetadata() { - if (metadataBuilder_ == null) { - metadata_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - metadataBuilder_.clear(); - } - return this; - } - public Builder removeMetadata(int index) { - if (metadataBuilder_ == null) { - ensureMetadataIsMutable(); - metadata_.remove(index); - onChanged(); - } else { - metadataBuilder_.remove(index); - } - return this; - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder getMetadataBuilder( - int index) { - return getMetadataFieldBuilder().getBuilder(index); - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder getMetadataOrBuilder( - int index) { - if (metadataBuilder_ == null) { - return metadata_.get(index); } else { - return metadataBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getMetadataOrBuilderList() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(metadata_); - } - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder addMetadataBuilder() { - return getMetadataFieldBuilder().addBuilder( - akka.cluster.RemoteProtocol.MetadataEntryProtocol.getDefaultInstance()); - } - public akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder addMetadataBuilder( - int index) { - return getMetadataFieldBuilder().addBuilder( - index, akka.cluster.RemoteProtocol.MetadataEntryProtocol.getDefaultInstance()); - } - public java.util.List - getMetadataBuilderList() { - return getMetadataFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - akka.cluster.RemoteProtocol.MetadataEntryProtocol, akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder, akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - akka.cluster.RemoteProtocol.MetadataEntryProtocol, akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder, akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder>( - metadata_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:RemoteMessageProtocol) - } - - static { - defaultInstance = new RemoteMessageProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:RemoteMessageProtocol) - } - - public interface RemoteControlProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string cookie = 1; - boolean hasCookie(); - String getCookie(); - - // required .CommandType commandType = 2; - boolean hasCommandType(); - akka.cluster.RemoteProtocol.CommandType getCommandType(); - } - public static final class RemoteControlProtocol extends - com.google.protobuf.GeneratedMessage - implements RemoteControlProtocolOrBuilder { - // Use RemoteControlProtocol.newBuilder() to construct. - private RemoteControlProtocol(Builder builder) { - super(builder); - } - private RemoteControlProtocol(boolean noInit) {} - - private static final RemoteControlProtocol defaultInstance; - public static RemoteControlProtocol getDefaultInstance() { - return defaultInstance; - } - - public RemoteControlProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteControlProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteControlProtocol_fieldAccessorTable; - } - - private int bitField0_; - // optional string cookie = 1; - public static final int COOKIE_FIELD_NUMBER = 1; - private java.lang.Object cookie_; - public boolean hasCookie() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getCookie() { - java.lang.Object ref = cookie_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - cookie_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getCookieBytes() { - java.lang.Object ref = cookie_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - cookie_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required .CommandType commandType = 2; - public static final int COMMANDTYPE_FIELD_NUMBER = 2; - private akka.cluster.RemoteProtocol.CommandType commandType_; - public boolean hasCommandType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.CommandType getCommandType() { - return commandType_; - } - - private void initFields() { - cookie_ = ""; - commandType_ = akka.cluster.RemoteProtocol.CommandType.CONNECT; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasCommandType()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getCookieBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, commandType_.getNumber()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getCookieBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, commandType_.getNumber()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteControlProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.RemoteControlProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.RemoteControlProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteControlProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteControlProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.RemoteControlProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - cookie_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - commandType_ = akka.cluster.RemoteProtocol.CommandType.CONNECT; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.RemoteControlProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.RemoteControlProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.RemoteControlProtocol build() { - akka.cluster.RemoteProtocol.RemoteControlProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.RemoteControlProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.RemoteControlProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.RemoteControlProtocol buildPartial() { - akka.cluster.RemoteProtocol.RemoteControlProtocol result = new akka.cluster.RemoteProtocol.RemoteControlProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.cookie_ = cookie_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.commandType_ = commandType_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.RemoteControlProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.RemoteControlProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.RemoteControlProtocol other) { - if (other == akka.cluster.RemoteProtocol.RemoteControlProtocol.getDefaultInstance()) return this; - if (other.hasCookie()) { - setCookie(other.getCookie()); - } - if (other.hasCommandType()) { - setCommandType(other.getCommandType()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasCommandType()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - cookie_ = input.readBytes(); - break; - } - case 16: { - int rawValue = input.readEnum(); - akka.cluster.RemoteProtocol.CommandType value = akka.cluster.RemoteProtocol.CommandType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - commandType_ = value; - } - break; - } - } - } - } - - private int bitField0_; - - // optional string cookie = 1; - private java.lang.Object cookie_ = ""; - public boolean hasCookie() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getCookie() { - java.lang.Object ref = cookie_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - cookie_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setCookie(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - cookie_ = value; - onChanged(); - return this; - } - public Builder clearCookie() { - bitField0_ = (bitField0_ & ~0x00000001); - cookie_ = getDefaultInstance().getCookie(); - onChanged(); - return this; - } - void setCookie(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - cookie_ = value; - onChanged(); - } - - // required .CommandType commandType = 2; - private akka.cluster.RemoteProtocol.CommandType commandType_ = akka.cluster.RemoteProtocol.CommandType.CONNECT; - public boolean hasCommandType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.CommandType getCommandType() { - return commandType_; - } - public Builder setCommandType(akka.cluster.RemoteProtocol.CommandType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - commandType_ = value; - onChanged(); - return this; - } - public Builder clearCommandType() { - bitField0_ = (bitField0_ & ~0x00000002); - commandType_ = akka.cluster.RemoteProtocol.CommandType.CONNECT; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:RemoteControlProtocol) - } - - static { - defaultInstance = new RemoteControlProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:RemoteControlProtocol) - } - - public interface RemoteActorRefProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string address = 1; - boolean hasAddress(); - String getAddress(); - - // required bytes inetSocketAddress = 2; - boolean hasInetSocketAddress(); - com.google.protobuf.ByteString getInetSocketAddress(); - - // optional uint64 timeout = 3; - boolean hasTimeout(); - long getTimeout(); - } - public static final class RemoteActorRefProtocol extends - com.google.protobuf.GeneratedMessage - implements RemoteActorRefProtocolOrBuilder { - // Use RemoteActorRefProtocol.newBuilder() to construct. - private RemoteActorRefProtocol(Builder builder) { - super(builder); - } - private RemoteActorRefProtocol(boolean noInit) {} - - private static final RemoteActorRefProtocol defaultInstance; - public static RemoteActorRefProtocol getDefaultInstance() { - return defaultInstance; - } - - public RemoteActorRefProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteActorRefProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required string address = 1; - public static final int ADDRESS_FIELD_NUMBER = 1; - private java.lang.Object address_; - public boolean hasAddress() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - address_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required bytes inetSocketAddress = 2; - public static final int INETSOCKETADDRESS_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString inetSocketAddress_; - public boolean hasInetSocketAddress() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getInetSocketAddress() { - return inetSocketAddress_; - } - - // optional uint64 timeout = 3; - public static final int TIMEOUT_FIELD_NUMBER = 3; - private long timeout_; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getTimeout() { - return timeout_; - } - - private void initFields() { - address_ = ""; - inetSocketAddress_ = com.google.protobuf.ByteString.EMPTY; - timeout_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasAddress()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasInetSocketAddress()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getAddressBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, inetSocketAddress_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt64(3, timeout_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getAddressBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, inetSocketAddress_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, timeout_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.RemoteActorRefProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteActorRefProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.RemoteActorRefProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - address_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - inetSocketAddress_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - timeout_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol build() { - akka.cluster.RemoteProtocol.RemoteActorRefProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.RemoteActorRefProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.RemoteActorRefProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol buildPartial() { - akka.cluster.RemoteProtocol.RemoteActorRefProtocol result = new akka.cluster.RemoteProtocol.RemoteActorRefProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.address_ = address_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.inetSocketAddress_ = inetSocketAddress_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.timeout_ = timeout_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.RemoteActorRefProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.RemoteActorRefProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.RemoteActorRefProtocol other) { - if (other == akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) return this; - if (other.hasAddress()) { - setAddress(other.getAddress()); - } - if (other.hasInetSocketAddress()) { - setInetSocketAddress(other.getInetSocketAddress()); - } - if (other.hasTimeout()) { - setTimeout(other.getTimeout()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasAddress()) { - - return false; - } - if (!hasInetSocketAddress()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - address_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - inetSocketAddress_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - timeout_ = input.readUInt64(); - break; - } - } - } - } - - private int bitField0_; - - // required string address = 1; - private java.lang.Object address_ = ""; - public boolean hasAddress() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - address_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setAddress(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - address_ = value; - onChanged(); - return this; - } - public Builder clearAddress() { - bitField0_ = (bitField0_ & ~0x00000001); - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - void setAddress(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - address_ = value; - onChanged(); - } - - // required bytes inetSocketAddress = 2; - private com.google.protobuf.ByteString inetSocketAddress_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasInetSocketAddress() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getInetSocketAddress() { - return inetSocketAddress_; - } - public Builder setInetSocketAddress(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - inetSocketAddress_ = value; - onChanged(); - return this; - } - public Builder clearInetSocketAddress() { - bitField0_ = (bitField0_ & ~0x00000002); - inetSocketAddress_ = getDefaultInstance().getInetSocketAddress(); - onChanged(); - return this; - } - - // optional uint64 timeout = 3; - private long timeout_ ; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getTimeout() { - return timeout_; - } - public Builder setTimeout(long value) { - bitField0_ |= 0x00000004; - timeout_ = value; - onChanged(); - return this; - } - public Builder clearTimeout() { - bitField0_ = (bitField0_ & ~0x00000004); - timeout_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:RemoteActorRefProtocol) - } - - static { - defaultInstance = new RemoteActorRefProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:RemoteActorRefProtocol) - } - - public interface SerializedActorRefProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .UuidProtocol uuid = 1; - boolean hasUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder(); - - // required string address = 2; - boolean hasAddress(); - String getAddress(); - - // required string actorClassname = 3; - boolean hasActorClassname(); - String getActorClassname(); - - // optional bytes actorInstance = 4; - boolean hasActorInstance(); - com.google.protobuf.ByteString getActorInstance(); - - // optional string serializerClassname = 5; - boolean hasSerializerClassname(); - String getSerializerClassname(); - - // optional uint64 timeout = 6; - boolean hasTimeout(); - long getTimeout(); - - // optional uint64 receiveTimeout = 7; - boolean hasReceiveTimeout(); - long getReceiveTimeout(); - - // optional .LifeCycleProtocol lifeCycle = 8; - boolean hasLifeCycle(); - akka.cluster.RemoteProtocol.LifeCycleProtocol getLifeCycle(); - akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder getLifeCycleOrBuilder(); - - // optional .RemoteActorRefProtocol supervisor = 9; - boolean hasSupervisor(); - akka.cluster.RemoteProtocol.RemoteActorRefProtocol getSupervisor(); - akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder getSupervisorOrBuilder(); - - // optional bytes hotswapStack = 10; - boolean hasHotswapStack(); - com.google.protobuf.ByteString getHotswapStack(); - - // optional .ReplicationStorageType replicationStorage = 11; - boolean hasReplicationStorage(); - akka.cluster.RemoteProtocol.ReplicationStorageType getReplicationStorage(); - - // optional .ReplicationStrategyType replicationStrategy = 12; - boolean hasReplicationStrategy(); - akka.cluster.RemoteProtocol.ReplicationStrategyType getReplicationStrategy(); - - // repeated .RemoteMessageProtocol messages = 13; - java.util.List - getMessagesList(); - akka.cluster.RemoteProtocol.RemoteMessageProtocol getMessages(int index); - int getMessagesCount(); - java.util.List - getMessagesOrBuilderList(); - akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder getMessagesOrBuilder( - int index); - } - public static final class SerializedActorRefProtocol extends - com.google.protobuf.GeneratedMessage - implements SerializedActorRefProtocolOrBuilder { - // Use SerializedActorRefProtocol.newBuilder() to construct. - private SerializedActorRefProtocol(Builder builder) { - super(builder); - } - private SerializedActorRefProtocol(boolean noInit) {} - - private static final SerializedActorRefProtocol defaultInstance; - public static SerializedActorRefProtocol getDefaultInstance() { - return defaultInstance; - } - - public SerializedActorRefProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_SerializedActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_SerializedActorRefProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required .UuidProtocol uuid = 1; - public static final int UUID_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.UuidProtocol uuid_; - public boolean hasUuid() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.UuidProtocol getUuid() { - return uuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder() { - return uuid_; - } - - // required string address = 2; - public static final int ADDRESS_FIELD_NUMBER = 2; - private java.lang.Object address_; - public boolean hasAddress() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - address_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string actorClassname = 3; - public static final int ACTORCLASSNAME_FIELD_NUMBER = 3; - private java.lang.Object actorClassname_; - public boolean hasActorClassname() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getActorClassname() { - java.lang.Object ref = actorClassname_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - actorClassname_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getActorClassnameBytes() { - java.lang.Object ref = actorClassname_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - actorClassname_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional bytes actorInstance = 4; - public static final int ACTORINSTANCE_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString actorInstance_; - public boolean hasActorInstance() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getActorInstance() { - return actorInstance_; - } - - // optional string serializerClassname = 5; - public static final int SERIALIZERCLASSNAME_FIELD_NUMBER = 5; - private java.lang.Object serializerClassname_; - public boolean hasSerializerClassname() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public String getSerializerClassname() { - java.lang.Object ref = serializerClassname_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - serializerClassname_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getSerializerClassnameBytes() { - java.lang.Object ref = serializerClassname_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - serializerClassname_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional uint64 timeout = 6; - public static final int TIMEOUT_FIELD_NUMBER = 6; - private long timeout_; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public long getTimeout() { - return timeout_; - } - - // optional uint64 receiveTimeout = 7; - public static final int RECEIVETIMEOUT_FIELD_NUMBER = 7; - private long receiveTimeout_; - public boolean hasReceiveTimeout() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public long getReceiveTimeout() { - return receiveTimeout_; - } - - // optional .LifeCycleProtocol lifeCycle = 8; - public static final int LIFECYCLE_FIELD_NUMBER = 8; - private akka.cluster.RemoteProtocol.LifeCycleProtocol lifeCycle_; - public boolean hasLifeCycle() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public akka.cluster.RemoteProtocol.LifeCycleProtocol getLifeCycle() { - return lifeCycle_; - } - public akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder getLifeCycleOrBuilder() { - return lifeCycle_; - } - - // optional .RemoteActorRefProtocol supervisor = 9; - public static final int SUPERVISOR_FIELD_NUMBER = 9; - private akka.cluster.RemoteProtocol.RemoteActorRefProtocol supervisor_; - public boolean hasSupervisor() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol getSupervisor() { - return supervisor_; - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder getSupervisorOrBuilder() { - return supervisor_; - } - - // optional bytes hotswapStack = 10; - public static final int HOTSWAPSTACK_FIELD_NUMBER = 10; - private com.google.protobuf.ByteString hotswapStack_; - public boolean hasHotswapStack() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - public com.google.protobuf.ByteString getHotswapStack() { - return hotswapStack_; - } - - // optional .ReplicationStorageType replicationStorage = 11; - public static final int REPLICATIONSTORAGE_FIELD_NUMBER = 11; - private akka.cluster.RemoteProtocol.ReplicationStorageType replicationStorage_; - public boolean hasReplicationStorage() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - public akka.cluster.RemoteProtocol.ReplicationStorageType getReplicationStorage() { - return replicationStorage_; - } - - // optional .ReplicationStrategyType replicationStrategy = 12; - public static final int REPLICATIONSTRATEGY_FIELD_NUMBER = 12; - private akka.cluster.RemoteProtocol.ReplicationStrategyType replicationStrategy_; - public boolean hasReplicationStrategy() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - public akka.cluster.RemoteProtocol.ReplicationStrategyType getReplicationStrategy() { - return replicationStrategy_; - } - - // repeated .RemoteMessageProtocol messages = 13; - public static final int MESSAGES_FIELD_NUMBER = 13; - private java.util.List messages_; - public java.util.List getMessagesList() { - return messages_; - } - public java.util.List - getMessagesOrBuilderList() { - return messages_; - } - public int getMessagesCount() { - return messages_.size(); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol getMessages(int index) { - return messages_.get(index); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder getMessagesOrBuilder( - int index) { - return messages_.get(index); - } - - private void initFields() { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - address_ = ""; - actorClassname_ = ""; - actorInstance_ = com.google.protobuf.ByteString.EMPTY; - serializerClassname_ = ""; - timeout_ = 0L; - receiveTimeout_ = 0L; - lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); - supervisor_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - hotswapStack_ = com.google.protobuf.ByteString.EMPTY; - replicationStorage_ = akka.cluster.RemoteProtocol.ReplicationStorageType.TRANSIENT; - replicationStrategy_ = akka.cluster.RemoteProtocol.ReplicationStrategyType.WRITE_THROUGH; - messages_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasUuid()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasAddress()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasActorClassname()) { - memoizedIsInitialized = 0; - return false; - } - if (!getUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - if (hasLifeCycle()) { - if (!getLifeCycle().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasSupervisor()) { - if (!getSupervisor().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getMessagesCount(); i++) { - if (!getMessages(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, uuid_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getAddressBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getActorClassnameBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, actorInstance_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getSerializerClassnameBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeUInt64(6, timeout_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt64(7, receiveTimeout_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeMessage(8, lifeCycle_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeMessage(9, supervisor_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeBytes(10, hotswapStack_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeEnum(11, replicationStorage_.getNumber()); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeEnum(12, replicationStrategy_.getNumber()); - } - for (int i = 0; i < messages_.size(); i++) { - output.writeMessage(13, messages_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, uuid_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getAddressBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getActorClassnameBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, actorInstance_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getSerializerClassnameBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(6, timeout_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(7, receiveTimeout_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, lifeCycle_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, supervisor_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, hotswapStack_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, replicationStorage_.getNumber()); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, replicationStrategy_.getNumber()); - } - for (int i = 0; i < messages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, messages_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.SerializedActorRefProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_SerializedActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_SerializedActorRefProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.SerializedActorRefProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getUuidFieldBuilder(); - getLifeCycleFieldBuilder(); - getSupervisorFieldBuilder(); - getMessagesFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (uuidBuilder_ == null) { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - uuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - address_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - actorClassname_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - actorInstance_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - serializerClassname_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - timeout_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - receiveTimeout_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - if (lifeCycleBuilder_ == null) { - lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); - } else { - lifeCycleBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - if (supervisorBuilder_ == null) { - supervisor_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - } else { - supervisorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000100); - hotswapStack_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000200); - replicationStorage_ = akka.cluster.RemoteProtocol.ReplicationStorageType.TRANSIENT; - bitField0_ = (bitField0_ & ~0x00000400); - replicationStrategy_ = akka.cluster.RemoteProtocol.ReplicationStrategyType.WRITE_THROUGH; - bitField0_ = (bitField0_ & ~0x00000800); - if (messagesBuilder_ == null) { - messages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); - } else { - messagesBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.SerializedActorRefProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.SerializedActorRefProtocol build() { - akka.cluster.RemoteProtocol.SerializedActorRefProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.SerializedActorRefProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.SerializedActorRefProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.SerializedActorRefProtocol buildPartial() { - akka.cluster.RemoteProtocol.SerializedActorRefProtocol result = new akka.cluster.RemoteProtocol.SerializedActorRefProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (uuidBuilder_ == null) { - result.uuid_ = uuid_; - } else { - result.uuid_ = uuidBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.address_ = address_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.actorClassname_ = actorClassname_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.actorInstance_ = actorInstance_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.serializerClassname_ = serializerClassname_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.timeout_ = timeout_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.receiveTimeout_ = receiveTimeout_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - if (lifeCycleBuilder_ == null) { - result.lifeCycle_ = lifeCycle_; - } else { - result.lifeCycle_ = lifeCycleBuilder_.build(); - } - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - if (supervisorBuilder_ == null) { - result.supervisor_ = supervisor_; - } else { - result.supervisor_ = supervisorBuilder_.build(); - } - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.hotswapStack_ = hotswapStack_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.replicationStorage_ = replicationStorage_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.replicationStrategy_ = replicationStrategy_; - if (messagesBuilder_ == null) { - if (((bitField0_ & 0x00001000) == 0x00001000)) { - messages_ = java.util.Collections.unmodifiableList(messages_); - bitField0_ = (bitField0_ & ~0x00001000); - } - result.messages_ = messages_; - } else { - result.messages_ = messagesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.SerializedActorRefProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.SerializedActorRefProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.SerializedActorRefProtocol other) { - if (other == akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance()) return this; - if (other.hasUuid()) { - mergeUuid(other.getUuid()); - } - if (other.hasAddress()) { - setAddress(other.getAddress()); - } - if (other.hasActorClassname()) { - setActorClassname(other.getActorClassname()); - } - if (other.hasActorInstance()) { - setActorInstance(other.getActorInstance()); - } - if (other.hasSerializerClassname()) { - setSerializerClassname(other.getSerializerClassname()); - } - if (other.hasTimeout()) { - setTimeout(other.getTimeout()); - } - if (other.hasReceiveTimeout()) { - setReceiveTimeout(other.getReceiveTimeout()); - } - if (other.hasLifeCycle()) { - mergeLifeCycle(other.getLifeCycle()); - } - if (other.hasSupervisor()) { - mergeSupervisor(other.getSupervisor()); - } - if (other.hasHotswapStack()) { - setHotswapStack(other.getHotswapStack()); - } - if (other.hasReplicationStorage()) { - setReplicationStorage(other.getReplicationStorage()); - } - if (other.hasReplicationStrategy()) { - setReplicationStrategy(other.getReplicationStrategy()); - } - if (messagesBuilder_ == null) { - if (!other.messages_.isEmpty()) { - if (messages_.isEmpty()) { - messages_ = other.messages_; - bitField0_ = (bitField0_ & ~0x00001000); - } else { - ensureMessagesIsMutable(); - messages_.addAll(other.messages_); - } - onChanged(); - } - } else { - if (!other.messages_.isEmpty()) { - if (messagesBuilder_.isEmpty()) { - messagesBuilder_.dispose(); - messagesBuilder_ = null; - messages_ = other.messages_; - bitField0_ = (bitField0_ & ~0x00001000); - messagesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMessagesFieldBuilder() : null; - } else { - messagesBuilder_.addAllMessages(other.messages_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasUuid()) { - - return false; - } - if (!hasAddress()) { - - return false; - } - if (!hasActorClassname()) { - - return false; - } - if (!getUuid().isInitialized()) { - - return false; - } - if (hasLifeCycle()) { - if (!getLifeCycle().isInitialized()) { - - return false; - } - } - if (hasSupervisor()) { - if (!getSupervisor().isInitialized()) { - - return false; - } - } - for (int i = 0; i < getMessagesCount(); i++) { - if (!getMessages(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasUuid()) { - subBuilder.mergeFrom(getUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setUuid(subBuilder.buildPartial()); - break; - } - case 18: { - bitField0_ |= 0x00000002; - address_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - actorClassname_ = input.readBytes(); - break; - } - case 34: { - bitField0_ |= 0x00000008; - actorInstance_ = input.readBytes(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - serializerClassname_ = input.readBytes(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - timeout_ = input.readUInt64(); - break; - } - case 56: { - bitField0_ |= 0x00000040; - receiveTimeout_ = input.readUInt64(); - break; - } - case 66: { - akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.LifeCycleProtocol.newBuilder(); - if (hasLifeCycle()) { - subBuilder.mergeFrom(getLifeCycle()); - } - input.readMessage(subBuilder, extensionRegistry); - setLifeCycle(subBuilder.buildPartial()); - break; - } - case 74: { - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.newBuilder(); - if (hasSupervisor()) { - subBuilder.mergeFrom(getSupervisor()); - } - input.readMessage(subBuilder, extensionRegistry); - setSupervisor(subBuilder.buildPartial()); - break; - } - case 82: { - bitField0_ |= 0x00000200; - hotswapStack_ = input.readBytes(); - break; - } - case 88: { - int rawValue = input.readEnum(); - akka.cluster.RemoteProtocol.ReplicationStorageType value = akka.cluster.RemoteProtocol.ReplicationStorageType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(11, rawValue); - } else { - bitField0_ |= 0x00000400; - replicationStorage_ = value; - } - break; - } - case 96: { - int rawValue = input.readEnum(); - akka.cluster.RemoteProtocol.ReplicationStrategyType value = akka.cluster.RemoteProtocol.ReplicationStrategyType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(12, rawValue); - } else { - bitField0_ |= 0x00000800; - replicationStrategy_ = value; - } - break; - } - case 106: { - akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.RemoteMessageProtocol.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addMessages(subBuilder.buildPartial()); - break; - } - } - } - } - - private int bitField0_; - - // required .UuidProtocol uuid = 1; - private akka.cluster.RemoteProtocol.UuidProtocol uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> uuidBuilder_; - public boolean hasUuid() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.UuidProtocol getUuid() { - if (uuidBuilder_ == null) { - return uuid_; - } else { - return uuidBuilder_.getMessage(); - } - } - public Builder setUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (uuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - uuid_ = value; - onChanged(); - } else { - uuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (uuidBuilder_ == null) { - uuid_ = builderForValue.build(); - onChanged(); - } else { - uuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (uuidBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - uuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - uuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(uuid_).mergeFrom(value).buildPartial(); - } else { - uuid_ = value; - } - onChanged(); - } else { - uuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearUuid() { - if (uuidBuilder_ == null) { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - uuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getUuidBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder() { - if (uuidBuilder_ != null) { - return uuidBuilder_.getMessageOrBuilder(); - } else { - return uuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getUuidFieldBuilder() { - if (uuidBuilder_ == null) { - uuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - uuid_, - getParentForChildren(), - isClean()); - uuid_ = null; - } - return uuidBuilder_; - } - - // required string address = 2; - private java.lang.Object address_ = ""; - public boolean hasAddress() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - address_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setAddress(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - address_ = value; - onChanged(); - return this; - } - public Builder clearAddress() { - bitField0_ = (bitField0_ & ~0x00000002); - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - void setAddress(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - address_ = value; - onChanged(); - } - - // required string actorClassname = 3; - private java.lang.Object actorClassname_ = ""; - public boolean hasActorClassname() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getActorClassname() { - java.lang.Object ref = actorClassname_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - actorClassname_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setActorClassname(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - actorClassname_ = value; - onChanged(); - return this; - } - public Builder clearActorClassname() { - bitField0_ = (bitField0_ & ~0x00000004); - actorClassname_ = getDefaultInstance().getActorClassname(); - onChanged(); - return this; - } - void setActorClassname(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - actorClassname_ = value; - onChanged(); - } - - // optional bytes actorInstance = 4; - private com.google.protobuf.ByteString actorInstance_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasActorInstance() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getActorInstance() { - return actorInstance_; - } - public Builder setActorInstance(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - actorInstance_ = value; - onChanged(); - return this; - } - public Builder clearActorInstance() { - bitField0_ = (bitField0_ & ~0x00000008); - actorInstance_ = getDefaultInstance().getActorInstance(); - onChanged(); - return this; - } - - // optional string serializerClassname = 5; - private java.lang.Object serializerClassname_ = ""; - public boolean hasSerializerClassname() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public String getSerializerClassname() { - java.lang.Object ref = serializerClassname_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - serializerClassname_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setSerializerClassname(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - serializerClassname_ = value; - onChanged(); - return this; - } - public Builder clearSerializerClassname() { - bitField0_ = (bitField0_ & ~0x00000010); - serializerClassname_ = getDefaultInstance().getSerializerClassname(); - onChanged(); - return this; - } - void setSerializerClassname(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; - serializerClassname_ = value; - onChanged(); - } - - // optional uint64 timeout = 6; - private long timeout_ ; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public long getTimeout() { - return timeout_; - } - public Builder setTimeout(long value) { - bitField0_ |= 0x00000020; - timeout_ = value; - onChanged(); - return this; - } - public Builder clearTimeout() { - bitField0_ = (bitField0_ & ~0x00000020); - timeout_ = 0L; - onChanged(); - return this; - } - - // optional uint64 receiveTimeout = 7; - private long receiveTimeout_ ; - public boolean hasReceiveTimeout() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public long getReceiveTimeout() { - return receiveTimeout_; - } - public Builder setReceiveTimeout(long value) { - bitField0_ |= 0x00000040; - receiveTimeout_ = value; - onChanged(); - return this; - } - public Builder clearReceiveTimeout() { - bitField0_ = (bitField0_ & ~0x00000040); - receiveTimeout_ = 0L; - onChanged(); - return this; - } - - // optional .LifeCycleProtocol lifeCycle = 8; - private akka.cluster.RemoteProtocol.LifeCycleProtocol lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.LifeCycleProtocol, akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder, akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder> lifeCycleBuilder_; - public boolean hasLifeCycle() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public akka.cluster.RemoteProtocol.LifeCycleProtocol getLifeCycle() { - if (lifeCycleBuilder_ == null) { - return lifeCycle_; - } else { - return lifeCycleBuilder_.getMessage(); - } - } - public Builder setLifeCycle(akka.cluster.RemoteProtocol.LifeCycleProtocol value) { - if (lifeCycleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lifeCycle_ = value; - onChanged(); - } else { - lifeCycleBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - return this; - } - public Builder setLifeCycle( - akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder builderForValue) { - if (lifeCycleBuilder_ == null) { - lifeCycle_ = builderForValue.build(); - onChanged(); - } else { - lifeCycleBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - return this; - } - public Builder mergeLifeCycle(akka.cluster.RemoteProtocol.LifeCycleProtocol value) { - if (lifeCycleBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080) && - lifeCycle_ != akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance()) { - lifeCycle_ = - akka.cluster.RemoteProtocol.LifeCycleProtocol.newBuilder(lifeCycle_).mergeFrom(value).buildPartial(); - } else { - lifeCycle_ = value; - } - onChanged(); - } else { - lifeCycleBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; - return this; - } - public Builder clearLifeCycle() { - if (lifeCycleBuilder_ == null) { - lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); - onChanged(); - } else { - lifeCycleBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - public akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder getLifeCycleBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getLifeCycleFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder getLifeCycleOrBuilder() { - if (lifeCycleBuilder_ != null) { - return lifeCycleBuilder_.getMessageOrBuilder(); - } else { - return lifeCycle_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.LifeCycleProtocol, akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder, akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder> - getLifeCycleFieldBuilder() { - if (lifeCycleBuilder_ == null) { - lifeCycleBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.LifeCycleProtocol, akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder, akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder>( - lifeCycle_, - getParentForChildren(), - isClean()); - lifeCycle_ = null; - } - return lifeCycleBuilder_; - } - - // optional .RemoteActorRefProtocol supervisor = 9; - private akka.cluster.RemoteProtocol.RemoteActorRefProtocol supervisor_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteActorRefProtocol, akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder, akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder> supervisorBuilder_; - public boolean hasSupervisor() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol getSupervisor() { - if (supervisorBuilder_ == null) { - return supervisor_; - } else { - return supervisorBuilder_.getMessage(); - } - } - public Builder setSupervisor(akka.cluster.RemoteProtocol.RemoteActorRefProtocol value) { - if (supervisorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - supervisor_ = value; - onChanged(); - } else { - supervisorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - return this; - } - public Builder setSupervisor( - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder builderForValue) { - if (supervisorBuilder_ == null) { - supervisor_ = builderForValue.build(); - onChanged(); - } else { - supervisorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - return this; - } - public Builder mergeSupervisor(akka.cluster.RemoteProtocol.RemoteActorRefProtocol value) { - if (supervisorBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100) && - supervisor_ != akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance()) { - supervisor_ = - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.newBuilder(supervisor_).mergeFrom(value).buildPartial(); - } else { - supervisor_ = value; - } - onChanged(); - } else { - supervisorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000100; - return this; - } - public Builder clearSupervisor() { - if (supervisorBuilder_ == null) { - supervisor_ = akka.cluster.RemoteProtocol.RemoteActorRefProtocol.getDefaultInstance(); - onChanged(); - } else { - supervisorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000100); - return this; - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder getSupervisorBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return getSupervisorFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder getSupervisorOrBuilder() { - if (supervisorBuilder_ != null) { - return supervisorBuilder_.getMessageOrBuilder(); - } else { - return supervisor_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteActorRefProtocol, akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder, akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder> - getSupervisorFieldBuilder() { - if (supervisorBuilder_ == null) { - supervisorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.RemoteActorRefProtocol, akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder, akka.cluster.RemoteProtocol.RemoteActorRefProtocolOrBuilder>( - supervisor_, - getParentForChildren(), - isClean()); - supervisor_ = null; - } - return supervisorBuilder_; - } - - // optional bytes hotswapStack = 10; - private com.google.protobuf.ByteString hotswapStack_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasHotswapStack() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - public com.google.protobuf.ByteString getHotswapStack() { - return hotswapStack_; - } - public Builder setHotswapStack(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - hotswapStack_ = value; - onChanged(); - return this; - } - public Builder clearHotswapStack() { - bitField0_ = (bitField0_ & ~0x00000200); - hotswapStack_ = getDefaultInstance().getHotswapStack(); - onChanged(); - return this; - } - - // optional .ReplicationStorageType replicationStorage = 11; - private akka.cluster.RemoteProtocol.ReplicationStorageType replicationStorage_ = akka.cluster.RemoteProtocol.ReplicationStorageType.TRANSIENT; - public boolean hasReplicationStorage() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - public akka.cluster.RemoteProtocol.ReplicationStorageType getReplicationStorage() { - return replicationStorage_; - } - public Builder setReplicationStorage(akka.cluster.RemoteProtocol.ReplicationStorageType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - replicationStorage_ = value; - onChanged(); - return this; - } - public Builder clearReplicationStorage() { - bitField0_ = (bitField0_ & ~0x00000400); - replicationStorage_ = akka.cluster.RemoteProtocol.ReplicationStorageType.TRANSIENT; - onChanged(); - return this; - } - - // optional .ReplicationStrategyType replicationStrategy = 12; - private akka.cluster.RemoteProtocol.ReplicationStrategyType replicationStrategy_ = akka.cluster.RemoteProtocol.ReplicationStrategyType.WRITE_THROUGH; - public boolean hasReplicationStrategy() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - public akka.cluster.RemoteProtocol.ReplicationStrategyType getReplicationStrategy() { - return replicationStrategy_; - } - public Builder setReplicationStrategy(akka.cluster.RemoteProtocol.ReplicationStrategyType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - replicationStrategy_ = value; - onChanged(); - return this; - } - public Builder clearReplicationStrategy() { - bitField0_ = (bitField0_ & ~0x00000800); - replicationStrategy_ = akka.cluster.RemoteProtocol.ReplicationStrategyType.WRITE_THROUGH; - onChanged(); - return this; - } - - // repeated .RemoteMessageProtocol messages = 13; - private java.util.List messages_ = - java.util.Collections.emptyList(); - private void ensureMessagesIsMutable() { - if (!((bitField0_ & 0x00001000) == 0x00001000)) { - messages_ = new java.util.ArrayList(messages_); - bitField0_ |= 0x00001000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - akka.cluster.RemoteProtocol.RemoteMessageProtocol, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder, akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder> messagesBuilder_; - - public java.util.List getMessagesList() { - if (messagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(messages_); - } else { - return messagesBuilder_.getMessageList(); - } - } - public int getMessagesCount() { - if (messagesBuilder_ == null) { - return messages_.size(); - } else { - return messagesBuilder_.getCount(); - } - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol getMessages(int index) { - if (messagesBuilder_ == null) { - return messages_.get(index); - } else { - return messagesBuilder_.getMessage(index); - } - } - public Builder setMessages( - int index, akka.cluster.RemoteProtocol.RemoteMessageProtocol value) { - if (messagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); - messages_.set(index, value); - onChanged(); - } else { - messagesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setMessages( - int index, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder builderForValue) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.set(index, builderForValue.build()); - onChanged(); - } else { - messagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addMessages(akka.cluster.RemoteProtocol.RemoteMessageProtocol value) { - if (messagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); - messages_.add(value); - onChanged(); - } else { - messagesBuilder_.addMessage(value); - } - return this; - } - public Builder addMessages( - int index, akka.cluster.RemoteProtocol.RemoteMessageProtocol value) { - if (messagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); - messages_.add(index, value); - onChanged(); - } else { - messagesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addMessages( - akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder builderForValue) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.add(builderForValue.build()); - onChanged(); - } else { - messagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addMessages( - int index, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder builderForValue) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.add(index, builderForValue.build()); - onChanged(); - } else { - messagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllMessages( - java.lang.Iterable values) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - super.addAll(values, messages_); - onChanged(); - } else { - messagesBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearMessages() { - if (messagesBuilder_ == null) { - messages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); - onChanged(); - } else { - messagesBuilder_.clear(); - } - return this; - } - public Builder removeMessages(int index) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.remove(index); - onChanged(); - } else { - messagesBuilder_.remove(index); - } - return this; - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder getMessagesBuilder( - int index) { - return getMessagesFieldBuilder().getBuilder(index); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder getMessagesOrBuilder( - int index) { - if (messagesBuilder_ == null) { - return messages_.get(index); } else { - return messagesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getMessagesOrBuilderList() { - if (messagesBuilder_ != null) { - return messagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(messages_); - } - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder addMessagesBuilder() { - return getMessagesFieldBuilder().addBuilder( - akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance()); - } - public akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder addMessagesBuilder( - int index) { - return getMessagesFieldBuilder().addBuilder( - index, akka.cluster.RemoteProtocol.RemoteMessageProtocol.getDefaultInstance()); - } - public java.util.List - getMessagesBuilderList() { - return getMessagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - akka.cluster.RemoteProtocol.RemoteMessageProtocol, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder, akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder> - getMessagesFieldBuilder() { - if (messagesBuilder_ == null) { - messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - akka.cluster.RemoteProtocol.RemoteMessageProtocol, akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder, akka.cluster.RemoteProtocol.RemoteMessageProtocolOrBuilder>( - messages_, - ((bitField0_ & 0x00001000) == 0x00001000), - getParentForChildren(), - isClean()); - messages_ = null; - } - return messagesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:SerializedActorRefProtocol) - } - - static { - defaultInstance = new SerializedActorRefProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:SerializedActorRefProtocol) - } - - public interface SerializedTypedActorRefProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .SerializedActorRefProtocol actorRef = 1; - boolean hasActorRef(); - akka.cluster.RemoteProtocol.SerializedActorRefProtocol getActorRef(); - akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder getActorRefOrBuilder(); - - // required string interfaceName = 2; - boolean hasInterfaceName(); - String getInterfaceName(); - } - public static final class SerializedTypedActorRefProtocol extends - com.google.protobuf.GeneratedMessage - implements SerializedTypedActorRefProtocolOrBuilder { - // Use SerializedTypedActorRefProtocol.newBuilder() to construct. - private SerializedTypedActorRefProtocol(Builder builder) { - super(builder); - } - private SerializedTypedActorRefProtocol(boolean noInit) {} - - private static final SerializedTypedActorRefProtocol defaultInstance; - public static SerializedTypedActorRefProtocol getDefaultInstance() { - return defaultInstance; - } - - public SerializedTypedActorRefProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_SerializedTypedActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required .SerializedActorRefProtocol actorRef = 1; - public static final int ACTORREF_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.SerializedActorRefProtocol actorRef_; - public boolean hasActorRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.SerializedActorRefProtocol getActorRef() { - return actorRef_; - } - public akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder getActorRefOrBuilder() { - return actorRef_; - } - - // required string interfaceName = 2; - public static final int INTERFACENAME_FIELD_NUMBER = 2; - private java.lang.Object interfaceName_; - public boolean hasInterfaceName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getInterfaceName() { - java.lang.Object ref = interfaceName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - interfaceName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getInterfaceNameBytes() { - java.lang.Object ref = interfaceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - interfaceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - actorRef_ = akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance(); - interfaceName_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasActorRef()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasInterfaceName()) { - memoizedIsInitialized = 0; - return false; - } - if (!getActorRef().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, actorRef_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getInterfaceNameBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, actorRef_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getInterfaceNameBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_SerializedTypedActorRefProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getActorRefFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (actorRefBuilder_ == null) { - actorRef_ = akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance(); - } else { - actorRefBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - interfaceName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol build() { - akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol buildPartial() { - akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol result = new akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (actorRefBuilder_ == null) { - result.actorRef_ = actorRef_; - } else { - result.actorRef_ = actorRefBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.interfaceName_ = interfaceName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol other) { - if (other == akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol.getDefaultInstance()) return this; - if (other.hasActorRef()) { - mergeActorRef(other.getActorRef()); - } - if (other.hasInterfaceName()) { - setInterfaceName(other.getInterfaceName()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasActorRef()) { - - return false; - } - if (!hasInterfaceName()) { - - return false; - } - if (!getActorRef().isInitialized()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.SerializedActorRefProtocol.newBuilder(); - if (hasActorRef()) { - subBuilder.mergeFrom(getActorRef()); - } - input.readMessage(subBuilder, extensionRegistry); - setActorRef(subBuilder.buildPartial()); - break; - } - case 18: { - bitField0_ |= 0x00000002; - interfaceName_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required .SerializedActorRefProtocol actorRef = 1; - private akka.cluster.RemoteProtocol.SerializedActorRefProtocol actorRef_ = akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.SerializedActorRefProtocol, akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder, akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder> actorRefBuilder_; - public boolean hasActorRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.SerializedActorRefProtocol getActorRef() { - if (actorRefBuilder_ == null) { - return actorRef_; - } else { - return actorRefBuilder_.getMessage(); - } - } - public Builder setActorRef(akka.cluster.RemoteProtocol.SerializedActorRefProtocol value) { - if (actorRefBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - actorRef_ = value; - onChanged(); - } else { - actorRefBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setActorRef( - akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder builderForValue) { - if (actorRefBuilder_ == null) { - actorRef_ = builderForValue.build(); - onChanged(); - } else { - actorRefBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeActorRef(akka.cluster.RemoteProtocol.SerializedActorRefProtocol value) { - if (actorRefBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - actorRef_ != akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance()) { - actorRef_ = - akka.cluster.RemoteProtocol.SerializedActorRefProtocol.newBuilder(actorRef_).mergeFrom(value).buildPartial(); - } else { - actorRef_ = value; - } - onChanged(); - } else { - actorRefBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearActorRef() { - if (actorRefBuilder_ == null) { - actorRef_ = akka.cluster.RemoteProtocol.SerializedActorRefProtocol.getDefaultInstance(); - onChanged(); - } else { - actorRefBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder getActorRefBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getActorRefFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder getActorRefOrBuilder() { - if (actorRefBuilder_ != null) { - return actorRefBuilder_.getMessageOrBuilder(); - } else { - return actorRef_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.SerializedActorRefProtocol, akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder, akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder> - getActorRefFieldBuilder() { - if (actorRefBuilder_ == null) { - actorRefBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.SerializedActorRefProtocol, akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder, akka.cluster.RemoteProtocol.SerializedActorRefProtocolOrBuilder>( - actorRef_, - getParentForChildren(), - isClean()); - actorRef_ = null; - } - return actorRefBuilder_; - } - - // required string interfaceName = 2; - private java.lang.Object interfaceName_ = ""; - public boolean hasInterfaceName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getInterfaceName() { - java.lang.Object ref = interfaceName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - interfaceName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setInterfaceName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - interfaceName_ = value; - onChanged(); - return this; - } - public Builder clearInterfaceName() { - bitField0_ = (bitField0_ & ~0x00000002); - interfaceName_ = getDefaultInstance().getInterfaceName(); - onChanged(); - return this; - } - void setInterfaceName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - interfaceName_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:SerializedTypedActorRefProtocol) - } - - static { - defaultInstance = new SerializedTypedActorRefProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:SerializedTypedActorRefProtocol) - } - - public interface MessageProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required bytes message = 1; - boolean hasMessage(); - com.google.protobuf.ByteString getMessage(); - - // optional bytes messageManifest = 2; - boolean hasMessageManifest(); - com.google.protobuf.ByteString getMessageManifest(); - } - public static final class MessageProtocol extends - com.google.protobuf.GeneratedMessage - implements MessageProtocolOrBuilder { - // Use MessageProtocol.newBuilder() to construct. - private MessageProtocol(Builder builder) { - super(builder); - } - private MessageProtocol(boolean noInit) {} - - private static final MessageProtocol defaultInstance; - public static MessageProtocol getDefaultInstance() { - return defaultInstance; - } - - public MessageProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_MessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_MessageProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required bytes message = 1; - public static final int MESSAGE_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString message_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.google.protobuf.ByteString getMessage() { - return message_; - } - - // optional bytes messageManifest = 2; - public static final int MESSAGEMANIFEST_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString messageManifest_; - public boolean hasMessageManifest() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getMessageManifest() { - return messageManifest_; - } - - private void initFields() { - message_ = com.google.protobuf.ByteString.EMPTY; - messageManifest_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasMessage()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, message_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, messageManifest_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, message_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, messageManifest_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.MessageProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.MessageProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_MessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_MessageProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.MessageProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - message_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - messageManifest_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.MessageProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.MessageProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.MessageProtocol build() { - akka.cluster.RemoteProtocol.MessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.MessageProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.MessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.MessageProtocol buildPartial() { - akka.cluster.RemoteProtocol.MessageProtocol result = new akka.cluster.RemoteProtocol.MessageProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.message_ = message_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.messageManifest_ = messageManifest_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.MessageProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.MessageProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.MessageProtocol other) { - if (other == akka.cluster.RemoteProtocol.MessageProtocol.getDefaultInstance()) return this; - if (other.hasMessage()) { - setMessage(other.getMessage()); - } - if (other.hasMessageManifest()) { - setMessageManifest(other.getMessageManifest()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasMessage()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - message_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - messageManifest_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required bytes message = 1; - private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasMessage() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.google.protobuf.ByteString getMessage() { - return message_; - } - public Builder setMessage(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - message_ = value; - onChanged(); - return this; - } - public Builder clearMessage() { - bitField0_ = (bitField0_ & ~0x00000001); - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - - // optional bytes messageManifest = 2; - private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasMessageManifest() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getMessageManifest() { - return messageManifest_; - } - public Builder setMessageManifest(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - messageManifest_ = value; - onChanged(); - return this; - } - public Builder clearMessageManifest() { - bitField0_ = (bitField0_ & ~0x00000002); - messageManifest_ = getDefaultInstance().getMessageManifest(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:MessageProtocol) - } - - static { - defaultInstance = new MessageProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:MessageProtocol) - } - - public interface ActorInfoProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .UuidProtocol uuid = 1; - boolean hasUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder(); - - // required uint64 timeout = 2; - boolean hasTimeout(); - long getTimeout(); - - // optional string address = 3; - boolean hasAddress(); - String getAddress(); - } - public static final class ActorInfoProtocol extends - com.google.protobuf.GeneratedMessage - implements ActorInfoProtocolOrBuilder { - // Use ActorInfoProtocol.newBuilder() to construct. - private ActorInfoProtocol(Builder builder) { - super(builder); - } - private ActorInfoProtocol(boolean noInit) {} - - private static final ActorInfoProtocol defaultInstance; - public static ActorInfoProtocol getDefaultInstance() { - return defaultInstance; - } - - public ActorInfoProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_ActorInfoProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_ActorInfoProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required .UuidProtocol uuid = 1; - public static final int UUID_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.UuidProtocol uuid_; - public boolean hasUuid() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.UuidProtocol getUuid() { - return uuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder() { - return uuid_; - } - - // required uint64 timeout = 2; - public static final int TIMEOUT_FIELD_NUMBER = 2; - private long timeout_; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public long getTimeout() { - return timeout_; - } - - // optional string address = 3; - public static final int ADDRESS_FIELD_NUMBER = 3; - private java.lang.Object address_; - public boolean hasAddress() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - address_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - timeout_ = 0L; - address_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasUuid()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTimeout()) { - memoizedIsInitialized = 0; - return false; - } - if (!getUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, uuid_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt64(2, timeout_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getAddressBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, uuid_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, timeout_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getAddressBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ActorInfoProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.ActorInfoProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.ActorInfoProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_ActorInfoProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_ActorInfoProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.ActorInfoProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getUuidFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (uuidBuilder_ == null) { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - uuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - timeout_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - address_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.ActorInfoProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.ActorInfoProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.ActorInfoProtocol build() { - akka.cluster.RemoteProtocol.ActorInfoProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.ActorInfoProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.ActorInfoProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.ActorInfoProtocol buildPartial() { - akka.cluster.RemoteProtocol.ActorInfoProtocol result = new akka.cluster.RemoteProtocol.ActorInfoProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (uuidBuilder_ == null) { - result.uuid_ = uuid_; - } else { - result.uuid_ = uuidBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.timeout_ = timeout_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.address_ = address_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.ActorInfoProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.ActorInfoProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.ActorInfoProtocol other) { - if (other == akka.cluster.RemoteProtocol.ActorInfoProtocol.getDefaultInstance()) return this; - if (other.hasUuid()) { - mergeUuid(other.getUuid()); - } - if (other.hasTimeout()) { - setTimeout(other.getTimeout()); - } - if (other.hasAddress()) { - setAddress(other.getAddress()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasUuid()) { - - return false; - } - if (!hasTimeout()) { - - return false; - } - if (!getUuid().isInitialized()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasUuid()) { - subBuilder.mergeFrom(getUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setUuid(subBuilder.buildPartial()); - break; - } - case 16: { - bitField0_ |= 0x00000002; - timeout_ = input.readUInt64(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - address_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required .UuidProtocol uuid = 1; - private akka.cluster.RemoteProtocol.UuidProtocol uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> uuidBuilder_; - public boolean hasUuid() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.UuidProtocol getUuid() { - if (uuidBuilder_ == null) { - return uuid_; - } else { - return uuidBuilder_.getMessage(); - } - } - public Builder setUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (uuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - uuid_ = value; - onChanged(); - } else { - uuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (uuidBuilder_ == null) { - uuid_ = builderForValue.build(); - onChanged(); - } else { - uuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (uuidBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - uuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - uuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(uuid_).mergeFrom(value).buildPartial(); - } else { - uuid_ = value; - } - onChanged(); - } else { - uuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearUuid() { - if (uuidBuilder_ == null) { - uuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - uuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getUuidBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getUuidOrBuilder() { - if (uuidBuilder_ != null) { - return uuidBuilder_.getMessageOrBuilder(); - } else { - return uuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getUuidFieldBuilder() { - if (uuidBuilder_ == null) { - uuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - uuid_, - getParentForChildren(), - isClean()); - uuid_ = null; - } - return uuidBuilder_; - } - - // required uint64 timeout = 2; - private long timeout_ ; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public long getTimeout() { - return timeout_; - } - public Builder setTimeout(long value) { - bitField0_ |= 0x00000002; - timeout_ = value; - onChanged(); - return this; - } - public Builder clearTimeout() { - bitField0_ = (bitField0_ & ~0x00000002); - timeout_ = 0L; - onChanged(); - return this; - } - - // optional string address = 3; - private java.lang.Object address_ = ""; - public boolean hasAddress() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - address_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setAddress(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - address_ = value; - onChanged(); - return this; - } - public Builder clearAddress() { - bitField0_ = (bitField0_ & ~0x00000004); - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - void setAddress(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - address_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:ActorInfoProtocol) - } - - static { - defaultInstance = new ActorInfoProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:ActorInfoProtocol) - } - - public interface UuidProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint64 high = 1; - boolean hasHigh(); - long getHigh(); - - // required uint64 low = 2; - boolean hasLow(); - long getLow(); - } - public static final class UuidProtocol extends - com.google.protobuf.GeneratedMessage - implements UuidProtocolOrBuilder { - // Use UuidProtocol.newBuilder() to construct. - private UuidProtocol(Builder builder) { - super(builder); - } - private UuidProtocol(boolean noInit) {} - - private static final UuidProtocol defaultInstance; - public static UuidProtocol getDefaultInstance() { - return defaultInstance; - } - - public UuidProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_UuidProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_UuidProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required uint64 high = 1; - public static final int HIGH_FIELD_NUMBER = 1; - private long high_; - public boolean hasHigh() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getHigh() { - return high_; - } - - // required uint64 low = 2; - public static final int LOW_FIELD_NUMBER = 2; - private long low_; - public boolean hasLow() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public long getLow() { - return low_; - } - - private void initFields() { - high_ = 0L; - low_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasHigh()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasLow()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt64(1, high_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt64(2, low_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, high_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, low_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.UuidProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.UuidProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.UuidProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_UuidProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_UuidProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.UuidProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - high_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - low_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.UuidProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.UuidProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.UuidProtocol build() { - akka.cluster.RemoteProtocol.UuidProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.UuidProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.UuidProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.UuidProtocol buildPartial() { - akka.cluster.RemoteProtocol.UuidProtocol result = new akka.cluster.RemoteProtocol.UuidProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.high_ = high_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.low_ = low_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.UuidProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.UuidProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.UuidProtocol other) { - if (other == akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) return this; - if (other.hasHigh()) { - setHigh(other.getHigh()); - } - if (other.hasLow()) { - setLow(other.getLow()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasHigh()) { - - return false; - } - if (!hasLow()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - high_ = input.readUInt64(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - low_ = input.readUInt64(); - break; - } - } - } - } - - private int bitField0_; - - // required uint64 high = 1; - private long high_ ; - public boolean hasHigh() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getHigh() { - return high_; - } - public Builder setHigh(long value) { - bitField0_ |= 0x00000001; - high_ = value; - onChanged(); - return this; - } - public Builder clearHigh() { - bitField0_ = (bitField0_ & ~0x00000001); - high_ = 0L; - onChanged(); - return this; - } - - // required uint64 low = 2; - private long low_ ; - public boolean hasLow() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public long getLow() { - return low_; - } - public Builder setLow(long value) { - bitField0_ |= 0x00000002; - low_ = value; - onChanged(); - return this; - } - public Builder clearLow() { - bitField0_ = (bitField0_ & ~0x00000002); - low_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:UuidProtocol) - } - - static { - defaultInstance = new UuidProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:UuidProtocol) - } - - public interface MetadataEntryProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string key = 1; - boolean hasKey(); - String getKey(); - - // required bytes value = 2; - boolean hasValue(); - com.google.protobuf.ByteString getValue(); - } - public static final class MetadataEntryProtocol extends - com.google.protobuf.GeneratedMessage - implements MetadataEntryProtocolOrBuilder { - // Use MetadataEntryProtocol.newBuilder() to construct. - private MetadataEntryProtocol(Builder builder) { - super(builder); - } - private MetadataEntryProtocol(boolean noInit) {} - - private static final MetadataEntryProtocol defaultInstance; - public static MetadataEntryProtocol getDefaultInstance() { - return defaultInstance; - } - - public MetadataEntryProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_MetadataEntryProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_MetadataEntryProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required string key = 1; - public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getKey() { - java.lang.Object ref = key_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - key_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required bytes value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString value_; - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getValue() { - return value_; - } - - private void initFields() { - key_ = ""; - value_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasKey()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasValue()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getKeyBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, value_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getKeyBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, value_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.MetadataEntryProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.MetadataEntryProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.MetadataEntryProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_MetadataEntryProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_MetadataEntryProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.MetadataEntryProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - key_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.MetadataEntryProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.MetadataEntryProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.MetadataEntryProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.MetadataEntryProtocol build() { - akka.cluster.RemoteProtocol.MetadataEntryProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.MetadataEntryProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.MetadataEntryProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.MetadataEntryProtocol buildPartial() { - akka.cluster.RemoteProtocol.MetadataEntryProtocol result = new akka.cluster.RemoteProtocol.MetadataEntryProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.key_ = key_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.MetadataEntryProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.MetadataEntryProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.MetadataEntryProtocol other) { - if (other == akka.cluster.RemoteProtocol.MetadataEntryProtocol.getDefaultInstance()) return this; - if (other.hasKey()) { - setKey(other.getKey()); - } - if (other.hasValue()) { - setValue(other.getValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasKey()) { - - return false; - } - if (!hasValue()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - key_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - value_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required string key = 1; - private java.lang.Object key_ = ""; - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - key_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setKey(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - key_ = value; - onChanged(); - return this; - } - public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000001); - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - void setKey(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - key_ = value; - onChanged(); - } - - // required bytes value = 2; - private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getValue() { - return value_; - } - public Builder setValue(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:MetadataEntryProtocol) - } - - static { - defaultInstance = new MetadataEntryProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:MetadataEntryProtocol) - } - - public interface LifeCycleProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .LifeCycleType lifeCycle = 1; - boolean hasLifeCycle(); - akka.cluster.RemoteProtocol.LifeCycleType getLifeCycle(); - } - public static final class LifeCycleProtocol extends - com.google.protobuf.GeneratedMessage - implements LifeCycleProtocolOrBuilder { - // Use LifeCycleProtocol.newBuilder() to construct. - private LifeCycleProtocol(Builder builder) { - super(builder); - } - private LifeCycleProtocol(boolean noInit) {} - - private static final LifeCycleProtocol defaultInstance; - public static LifeCycleProtocol getDefaultInstance() { - return defaultInstance; - } - - public LifeCycleProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_LifeCycleProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_LifeCycleProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required .LifeCycleType lifeCycle = 1; - public static final int LIFECYCLE_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.LifeCycleType lifeCycle_; - public boolean hasLifeCycle() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.LifeCycleType getLifeCycle() { - return lifeCycle_; - } - - private void initFields() { - lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleType.PERMANENT; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasLifeCycle()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, lifeCycle_.getNumber()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, lifeCycle_.getNumber()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.LifeCycleProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.LifeCycleProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.LifeCycleProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_LifeCycleProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_LifeCycleProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.LifeCycleProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleType.PERMANENT; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.LifeCycleProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.LifeCycleProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.LifeCycleProtocol build() { - akka.cluster.RemoteProtocol.LifeCycleProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.LifeCycleProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.LifeCycleProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.LifeCycleProtocol buildPartial() { - akka.cluster.RemoteProtocol.LifeCycleProtocol result = new akka.cluster.RemoteProtocol.LifeCycleProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lifeCycle_ = lifeCycle_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.LifeCycleProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.LifeCycleProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.LifeCycleProtocol other) { - if (other == akka.cluster.RemoteProtocol.LifeCycleProtocol.getDefaultInstance()) return this; - if (other.hasLifeCycle()) { - setLifeCycle(other.getLifeCycle()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasLifeCycle()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - akka.cluster.RemoteProtocol.LifeCycleType value = akka.cluster.RemoteProtocol.LifeCycleType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - lifeCycle_ = value; - } - break; - } - } - } - } - - private int bitField0_; - - // required .LifeCycleType lifeCycle = 1; - private akka.cluster.RemoteProtocol.LifeCycleType lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleType.PERMANENT; - public boolean hasLifeCycle() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.LifeCycleType getLifeCycle() { - return lifeCycle_; - } - public Builder setLifeCycle(akka.cluster.RemoteProtocol.LifeCycleType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - lifeCycle_ = value; - onChanged(); - return this; - } - public Builder clearLifeCycle() { - bitField0_ = (bitField0_ & ~0x00000001); - lifeCycle_ = akka.cluster.RemoteProtocol.LifeCycleType.PERMANENT; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:LifeCycleProtocol) - } - - static { - defaultInstance = new LifeCycleProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:LifeCycleProtocol) - } - - public interface AddressProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string hostname = 1; - boolean hasHostname(); - String getHostname(); - - // required uint32 port = 2; - boolean hasPort(); - int getPort(); - } - public static final class AddressProtocol extends - com.google.protobuf.GeneratedMessage - implements AddressProtocolOrBuilder { - // Use AddressProtocol.newBuilder() to construct. - private AddressProtocol(Builder builder) { - super(builder); - } - private AddressProtocol(boolean noInit) {} - - private static final AddressProtocol defaultInstance; - public static AddressProtocol getDefaultInstance() { - return defaultInstance; - } - - public AddressProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_AddressProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_AddressProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required string hostname = 1; - public static final int HOSTNAME_FIELD_NUMBER = 1; - private java.lang.Object hostname_; - public boolean hasHostname() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getHostname() { - java.lang.Object ref = hostname_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - hostname_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getHostnameBytes() { - java.lang.Object ref = hostname_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - hostname_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required uint32 port = 2; - public static final int PORT_FIELD_NUMBER = 2; - private int port_; - public boolean hasPort() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getPort() { - return port_; - } - - private void initFields() { - hostname_ = ""; - port_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasHostname()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasPort()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getHostnameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, port_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getHostnameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, port_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.AddressProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.AddressProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.AddressProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_AddressProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_AddressProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.AddressProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - hostname_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - port_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.AddressProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.AddressProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.AddressProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.AddressProtocol build() { - akka.cluster.RemoteProtocol.AddressProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.AddressProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.AddressProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.AddressProtocol buildPartial() { - akka.cluster.RemoteProtocol.AddressProtocol result = new akka.cluster.RemoteProtocol.AddressProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.hostname_ = hostname_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.port_ = port_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.AddressProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.AddressProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.AddressProtocol other) { - if (other == akka.cluster.RemoteProtocol.AddressProtocol.getDefaultInstance()) return this; - if (other.hasHostname()) { - setHostname(other.getHostname()); - } - if (other.hasPort()) { - setPort(other.getPort()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasHostname()) { - - return false; - } - if (!hasPort()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - hostname_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - port_ = input.readUInt32(); - break; - } - } - } - } - - private int bitField0_; - - // required string hostname = 1; - private java.lang.Object hostname_ = ""; - public boolean hasHostname() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getHostname() { - java.lang.Object ref = hostname_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - hostname_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setHostname(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - hostname_ = value; - onChanged(); - return this; - } - public Builder clearHostname() { - bitField0_ = (bitField0_ & ~0x00000001); - hostname_ = getDefaultInstance().getHostname(); - onChanged(); - return this; - } - void setHostname(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - hostname_ = value; - onChanged(); - } - - // required uint32 port = 2; - private int port_ ; - public boolean hasPort() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getPort() { - return port_; - } - public Builder setPort(int value) { - bitField0_ |= 0x00000002; - port_ = value; - onChanged(); - return this; - } - public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000002); - port_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:AddressProtocol) - } - - static { - defaultInstance = new AddressProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:AddressProtocol) - } - - public interface ExceptionProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string classname = 1; - boolean hasClassname(); - String getClassname(); - - // required string message = 2; - boolean hasMessage(); - String getMessage(); - } - public static final class ExceptionProtocol extends - com.google.protobuf.GeneratedMessage - implements ExceptionProtocolOrBuilder { - // Use ExceptionProtocol.newBuilder() to construct. - private ExceptionProtocol(Builder builder) { - super(builder); - } - private ExceptionProtocol(boolean noInit) {} - - private static final ExceptionProtocol defaultInstance; - public static ExceptionProtocol getDefaultInstance() { - return defaultInstance; - } - - public ExceptionProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_ExceptionProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_ExceptionProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required string classname = 1; - public static final int CLASSNAME_FIELD_NUMBER = 1; - private java.lang.Object classname_; - public boolean hasClassname() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getClassname() { - java.lang.Object ref = classname_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - classname_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getClassnameBytes() { - java.lang.Object ref = classname_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - classname_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string message = 2; - public static final int MESSAGE_FIELD_NUMBER = 2; - private java.lang.Object message_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - message_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - classname_ = ""; - message_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasClassname()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasMessage()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getClassnameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getMessageBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getClassnameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getMessageBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.ExceptionProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.ExceptionProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.ExceptionProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_ExceptionProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_ExceptionProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.ExceptionProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - classname_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - message_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.ExceptionProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.ExceptionProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.ExceptionProtocol build() { - akka.cluster.RemoteProtocol.ExceptionProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.ExceptionProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.ExceptionProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.ExceptionProtocol buildPartial() { - akka.cluster.RemoteProtocol.ExceptionProtocol result = new akka.cluster.RemoteProtocol.ExceptionProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.classname_ = classname_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.message_ = message_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.ExceptionProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.ExceptionProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.ExceptionProtocol other) { - if (other == akka.cluster.RemoteProtocol.ExceptionProtocol.getDefaultInstance()) return this; - if (other.hasClassname()) { - setClassname(other.getClassname()); - } - if (other.hasMessage()) { - setMessage(other.getMessage()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasClassname()) { - - return false; - } - if (!hasMessage()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - classname_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - message_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required string classname = 1; - private java.lang.Object classname_ = ""; - public boolean hasClassname() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getClassname() { - java.lang.Object ref = classname_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - classname_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setClassname(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - classname_ = value; - onChanged(); - return this; - } - public Builder clearClassname() { - bitField0_ = (bitField0_ & ~0x00000001); - classname_ = getDefaultInstance().getClassname(); - onChanged(); - return this; - } - void setClassname(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - classname_ = value; - onChanged(); - } - - // required string message = 2; - private java.lang.Object message_ = ""; - public boolean hasMessage() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - message_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setMessage(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - message_ = value; - onChanged(); - return this; - } - public Builder clearMessage() { - bitField0_ = (bitField0_ & ~0x00000002); - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - void setMessage(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - message_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:ExceptionProtocol) - } - - static { - defaultInstance = new ExceptionProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:ExceptionProtocol) - } - - public interface RemoteDaemonMessageProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .RemoteDaemonMessageType messageType = 1; - boolean hasMessageType(); - akka.cluster.RemoteProtocol.RemoteDaemonMessageType getMessageType(); - - // optional .UuidProtocol actorUuid = 2; - boolean hasActorUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getActorUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getActorUuidOrBuilder(); - - // optional string actorAddress = 3; - boolean hasActorAddress(); - String getActorAddress(); - - // optional bytes payload = 5; - boolean hasPayload(); - com.google.protobuf.ByteString getPayload(); - - // optional .UuidProtocol replicateActorFromUuid = 6; - boolean hasReplicateActorFromUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getReplicateActorFromUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getReplicateActorFromUuidOrBuilder(); - } - public static final class RemoteDaemonMessageProtocol extends - com.google.protobuf.GeneratedMessage - implements RemoteDaemonMessageProtocolOrBuilder { - // Use RemoteDaemonMessageProtocol.newBuilder() to construct. - private RemoteDaemonMessageProtocol(Builder builder) { - super(builder); - } - private RemoteDaemonMessageProtocol(boolean noInit) {} - - private static final RemoteDaemonMessageProtocol defaultInstance; - public static RemoteDaemonMessageProtocol getDefaultInstance() { - return defaultInstance; - } - - public RemoteDaemonMessageProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteDaemonMessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteDaemonMessageProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required .RemoteDaemonMessageType messageType = 1; - public static final int MESSAGETYPE_FIELD_NUMBER = 1; - private akka.cluster.RemoteProtocol.RemoteDaemonMessageType messageType_; - public boolean hasMessageType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.RemoteDaemonMessageType getMessageType() { - return messageType_; - } - - // optional .UuidProtocol actorUuid = 2; - public static final int ACTORUUID_FIELD_NUMBER = 2; - private akka.cluster.RemoteProtocol.UuidProtocol actorUuid_; - public boolean hasActorUuid() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.UuidProtocol getActorUuid() { - return actorUuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getActorUuidOrBuilder() { - return actorUuid_; - } - - // optional string actorAddress = 3; - public static final int ACTORADDRESS_FIELD_NUMBER = 3; - private java.lang.Object actorAddress_; - public boolean hasActorAddress() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getActorAddress() { - java.lang.Object ref = actorAddress_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - actorAddress_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getActorAddressBytes() { - java.lang.Object ref = actorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - actorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional bytes payload = 5; - public static final int PAYLOAD_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString payload_; - public boolean hasPayload() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - - // optional .UuidProtocol replicateActorFromUuid = 6; - public static final int REPLICATEACTORFROMUUID_FIELD_NUMBER = 6; - private akka.cluster.RemoteProtocol.UuidProtocol replicateActorFromUuid_; - public boolean hasReplicateActorFromUuid() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public akka.cluster.RemoteProtocol.UuidProtocol getReplicateActorFromUuid() { - return replicateActorFromUuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getReplicateActorFromUuidOrBuilder() { - return replicateActorFromUuid_; - } - - private void initFields() { - messageType_ = akka.cluster.RemoteProtocol.RemoteDaemonMessageType.STOP; - actorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - actorAddress_ = ""; - payload_ = com.google.protobuf.ByteString.EMPTY; - replicateActorFromUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasMessageType()) { - memoizedIsInitialized = 0; - return false; - } - if (hasActorUuid()) { - if (!getActorUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasReplicateActorFromUuid()) { - if (!getReplicateActorFromUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, messageType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, actorUuid_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getActorAddressBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(5, payload_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(6, replicateActorFromUuid_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, messageType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, actorUuid_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getActorAddressBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, payload_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, replicateActorFromUuid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_RemoteDaemonMessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_RemoteDaemonMessageProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getActorUuidFieldBuilder(); - getReplicateActorFromUuidFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - messageType_ = akka.cluster.RemoteProtocol.RemoteDaemonMessageType.STOP; - bitField0_ = (bitField0_ & ~0x00000001); - if (actorUuidBuilder_ == null) { - actorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - actorUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - actorAddress_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - payload_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - if (replicateActorFromUuidBuilder_ == null) { - replicateActorFromUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - replicateActorFromUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol build() { - akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol buildPartial() { - akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol result = new akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.messageType_ = messageType_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (actorUuidBuilder_ == null) { - result.actorUuid_ = actorUuid_; - } else { - result.actorUuid_ = actorUuidBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.actorAddress_ = actorAddress_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.payload_ = payload_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (replicateActorFromUuidBuilder_ == null) { - result.replicateActorFromUuid_ = replicateActorFromUuid_; - } else { - result.replicateActorFromUuid_ = replicateActorFromUuidBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol other) { - if (other == akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol.getDefaultInstance()) return this; - if (other.hasMessageType()) { - setMessageType(other.getMessageType()); - } - if (other.hasActorUuid()) { - mergeActorUuid(other.getActorUuid()); - } - if (other.hasActorAddress()) { - setActorAddress(other.getActorAddress()); - } - if (other.hasPayload()) { - setPayload(other.getPayload()); - } - if (other.hasReplicateActorFromUuid()) { - mergeReplicateActorFromUuid(other.getReplicateActorFromUuid()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasMessageType()) { - - return false; - } - if (hasActorUuid()) { - if (!getActorUuid().isInitialized()) { - - return false; - } - } - if (hasReplicateActorFromUuid()) { - if (!getReplicateActorFromUuid().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - akka.cluster.RemoteProtocol.RemoteDaemonMessageType value = akka.cluster.RemoteProtocol.RemoteDaemonMessageType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - messageType_ = value; - } - break; - } - case 18: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasActorUuid()) { - subBuilder.mergeFrom(getActorUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setActorUuid(subBuilder.buildPartial()); - break; - } - case 26: { - bitField0_ |= 0x00000004; - actorAddress_ = input.readBytes(); - break; - } - case 42: { - bitField0_ |= 0x00000008; - payload_ = input.readBytes(); - break; - } - case 50: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasReplicateActorFromUuid()) { - subBuilder.mergeFrom(getReplicateActorFromUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setReplicateActorFromUuid(subBuilder.buildPartial()); - break; - } - } - } - } - - private int bitField0_; - - // required .RemoteDaemonMessageType messageType = 1; - private akka.cluster.RemoteProtocol.RemoteDaemonMessageType messageType_ = akka.cluster.RemoteProtocol.RemoteDaemonMessageType.STOP; - public boolean hasMessageType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public akka.cluster.RemoteProtocol.RemoteDaemonMessageType getMessageType() { - return messageType_; - } - public Builder setMessageType(akka.cluster.RemoteProtocol.RemoteDaemonMessageType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - messageType_ = value; - onChanged(); - return this; - } - public Builder clearMessageType() { - bitField0_ = (bitField0_ & ~0x00000001); - messageType_ = akka.cluster.RemoteProtocol.RemoteDaemonMessageType.STOP; - onChanged(); - return this; - } - - // optional .UuidProtocol actorUuid = 2; - private akka.cluster.RemoteProtocol.UuidProtocol actorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> actorUuidBuilder_; - public boolean hasActorUuid() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public akka.cluster.RemoteProtocol.UuidProtocol getActorUuid() { - if (actorUuidBuilder_ == null) { - return actorUuid_; - } else { - return actorUuidBuilder_.getMessage(); - } - } - public Builder setActorUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (actorUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - actorUuid_ = value; - onChanged(); - } else { - actorUuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setActorUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (actorUuidBuilder_ == null) { - actorUuid_ = builderForValue.build(); - onChanged(); - } else { - actorUuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeActorUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (actorUuidBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - actorUuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - actorUuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(actorUuid_).mergeFrom(value).buildPartial(); - } else { - actorUuid_ = value; - } - onChanged(); - } else { - actorUuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearActorUuid() { - if (actorUuidBuilder_ == null) { - actorUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - actorUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getActorUuidBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getActorUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getActorUuidOrBuilder() { - if (actorUuidBuilder_ != null) { - return actorUuidBuilder_.getMessageOrBuilder(); - } else { - return actorUuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getActorUuidFieldBuilder() { - if (actorUuidBuilder_ == null) { - actorUuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - actorUuid_, - getParentForChildren(), - isClean()); - actorUuid_ = null; - } - return actorUuidBuilder_; - } - - // optional string actorAddress = 3; - private java.lang.Object actorAddress_ = ""; - public boolean hasActorAddress() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getActorAddress() { - java.lang.Object ref = actorAddress_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - actorAddress_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setActorAddress(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - actorAddress_ = value; - onChanged(); - return this; - } - public Builder clearActorAddress() { - bitField0_ = (bitField0_ & ~0x00000004); - actorAddress_ = getDefaultInstance().getActorAddress(); - onChanged(); - return this; - } - void setActorAddress(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - actorAddress_ = value; - onChanged(); - } - - // optional bytes payload = 5; - private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasPayload() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - public Builder setPayload(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - payload_ = value; - onChanged(); - return this; - } - public Builder clearPayload() { - bitField0_ = (bitField0_ & ~0x00000008); - payload_ = getDefaultInstance().getPayload(); - onChanged(); - return this; - } - - // optional .UuidProtocol replicateActorFromUuid = 6; - private akka.cluster.RemoteProtocol.UuidProtocol replicateActorFromUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> replicateActorFromUuidBuilder_; - public boolean hasReplicateActorFromUuid() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public akka.cluster.RemoteProtocol.UuidProtocol getReplicateActorFromUuid() { - if (replicateActorFromUuidBuilder_ == null) { - return replicateActorFromUuid_; - } else { - return replicateActorFromUuidBuilder_.getMessage(); - } - } - public Builder setReplicateActorFromUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (replicateActorFromUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - replicateActorFromUuid_ = value; - onChanged(); - } else { - replicateActorFromUuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - return this; - } - public Builder setReplicateActorFromUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (replicateActorFromUuidBuilder_ == null) { - replicateActorFromUuid_ = builderForValue.build(); - onChanged(); - } else { - replicateActorFromUuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - return this; - } - public Builder mergeReplicateActorFromUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (replicateActorFromUuidBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - replicateActorFromUuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - replicateActorFromUuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(replicateActorFromUuid_).mergeFrom(value).buildPartial(); - } else { - replicateActorFromUuid_ = value; - } - onChanged(); - } else { - replicateActorFromUuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000010; - return this; - } - public Builder clearReplicateActorFromUuid() { - if (replicateActorFromUuidBuilder_ == null) { - replicateActorFromUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - replicateActorFromUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getReplicateActorFromUuidBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getReplicateActorFromUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getReplicateActorFromUuidOrBuilder() { - if (replicateActorFromUuidBuilder_ != null) { - return replicateActorFromUuidBuilder_.getMessageOrBuilder(); - } else { - return replicateActorFromUuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getReplicateActorFromUuidFieldBuilder() { - if (replicateActorFromUuidBuilder_ == null) { - replicateActorFromUuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - replicateActorFromUuid_, - getParentForChildren(), - isClean()); - replicateActorFromUuid_ = null; - } - return replicateActorFromUuidBuilder_; - } - - // @@protoc_insertion_point(builder_scope:RemoteDaemonMessageProtocol) - } - - static { - defaultInstance = new RemoteDaemonMessageProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:RemoteDaemonMessageProtocol) - } - - public interface DurableMailboxMessageProtocolOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string ownerActorAddress = 1; - boolean hasOwnerActorAddress(); - String getOwnerActorAddress(); - - // optional string senderActorAddress = 2; - boolean hasSenderActorAddress(); - String getSenderActorAddress(); - - // optional .UuidProtocol futureUuid = 3; - boolean hasFutureUuid(); - akka.cluster.RemoteProtocol.UuidProtocol getFutureUuid(); - akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getFutureUuidOrBuilder(); - - // required bytes message = 4; - boolean hasMessage(); - com.google.protobuf.ByteString getMessage(); - } - public static final class DurableMailboxMessageProtocol extends - com.google.protobuf.GeneratedMessage - implements DurableMailboxMessageProtocolOrBuilder { - // Use DurableMailboxMessageProtocol.newBuilder() to construct. - private DurableMailboxMessageProtocol(Builder builder) { - super(builder); - } - private DurableMailboxMessageProtocol(boolean noInit) {} - - private static final DurableMailboxMessageProtocol defaultInstance; - public static DurableMailboxMessageProtocol getDefaultInstance() { - return defaultInstance; - } - - public DurableMailboxMessageProtocol getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_DurableMailboxMessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_DurableMailboxMessageProtocol_fieldAccessorTable; - } - - private int bitField0_; - // required string ownerActorAddress = 1; - public static final int OWNERACTORADDRESS_FIELD_NUMBER = 1; - private java.lang.Object ownerActorAddress_; - public boolean hasOwnerActorAddress() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getOwnerActorAddress() { - java.lang.Object ref = ownerActorAddress_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - ownerActorAddress_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getOwnerActorAddressBytes() { - java.lang.Object ref = ownerActorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - ownerActorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string senderActorAddress = 2; - public static final int SENDERACTORADDRESS_FIELD_NUMBER = 2; - private java.lang.Object senderActorAddress_; - public boolean hasSenderActorAddress() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getSenderActorAddress() { - java.lang.Object ref = senderActorAddress_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - senderActorAddress_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getSenderActorAddressBytes() { - java.lang.Object ref = senderActorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - senderActorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional .UuidProtocol futureUuid = 3; - public static final int FUTUREUUID_FIELD_NUMBER = 3; - private akka.cluster.RemoteProtocol.UuidProtocol futureUuid_; - public boolean hasFutureUuid() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public akka.cluster.RemoteProtocol.UuidProtocol getFutureUuid() { - return futureUuid_; - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getFutureUuidOrBuilder() { - return futureUuid_; - } - - // required bytes message = 4; - public static final int MESSAGE_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString message_; - public boolean hasMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getMessage() { - return message_; - } - - private void initFields() { - ownerActorAddress_ = ""; - senderActorAddress_ = ""; - futureUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - message_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasOwnerActorAddress()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasMessage()) { - memoizedIsInitialized = 0; - return false; - } - if (hasFutureUuid()) { - if (!getFutureUuid().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getOwnerActorAddressBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getSenderActorAddressBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, futureUuid_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, message_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getOwnerActorAddressBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getSenderActorAddressBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, futureUuid_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, message_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.cluster.RemoteProtocol.DurableMailboxMessageProtocolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.cluster.RemoteProtocol.internal_static_DurableMailboxMessageProtocol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.cluster.RemoteProtocol.internal_static_DurableMailboxMessageProtocol_fieldAccessorTable; - } - - // Construct using akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFutureUuidFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - ownerActorAddress_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - senderActorAddress_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (futureUuidBuilder_ == null) { - futureUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - } else { - futureUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - message_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol.getDescriptor(); - } - - public akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol getDefaultInstanceForType() { - return akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol.getDefaultInstance(); - } - - public akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol build() { - akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol buildPartial() { - akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol result = new akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.ownerActorAddress_ = ownerActorAddress_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.senderActorAddress_ = senderActorAddress_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (futureUuidBuilder_ == null) { - result.futureUuid_ = futureUuid_; - } else { - result.futureUuid_ = futureUuidBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.message_ = message_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol) { - return mergeFrom((akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol other) { - if (other == akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol.getDefaultInstance()) return this; - if (other.hasOwnerActorAddress()) { - setOwnerActorAddress(other.getOwnerActorAddress()); - } - if (other.hasSenderActorAddress()) { - setSenderActorAddress(other.getSenderActorAddress()); - } - if (other.hasFutureUuid()) { - mergeFutureUuid(other.getFutureUuid()); - } - if (other.hasMessage()) { - setMessage(other.getMessage()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasOwnerActorAddress()) { - - return false; - } - if (!hasMessage()) { - - return false; - } - if (hasFutureUuid()) { - if (!getFutureUuid().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - ownerActorAddress_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - senderActorAddress_ = input.readBytes(); - break; - } - case 26: { - akka.cluster.RemoteProtocol.UuidProtocol.Builder subBuilder = akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(); - if (hasFutureUuid()) { - subBuilder.mergeFrom(getFutureUuid()); - } - input.readMessage(subBuilder, extensionRegistry); - setFutureUuid(subBuilder.buildPartial()); - break; - } - case 34: { - bitField0_ |= 0x00000008; - message_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required string ownerActorAddress = 1; - private java.lang.Object ownerActorAddress_ = ""; - public boolean hasOwnerActorAddress() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getOwnerActorAddress() { - java.lang.Object ref = ownerActorAddress_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - ownerActorAddress_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setOwnerActorAddress(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - ownerActorAddress_ = value; - onChanged(); - return this; - } - public Builder clearOwnerActorAddress() { - bitField0_ = (bitField0_ & ~0x00000001); - ownerActorAddress_ = getDefaultInstance().getOwnerActorAddress(); - onChanged(); - return this; - } - void setOwnerActorAddress(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - ownerActorAddress_ = value; - onChanged(); - } - - // optional string senderActorAddress = 2; - private java.lang.Object senderActorAddress_ = ""; - public boolean hasSenderActorAddress() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getSenderActorAddress() { - java.lang.Object ref = senderActorAddress_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - senderActorAddress_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setSenderActorAddress(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - senderActorAddress_ = value; - onChanged(); - return this; - } - public Builder clearSenderActorAddress() { - bitField0_ = (bitField0_ & ~0x00000002); - senderActorAddress_ = getDefaultInstance().getSenderActorAddress(); - onChanged(); - return this; - } - void setSenderActorAddress(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - senderActorAddress_ = value; - onChanged(); - } - - // optional .UuidProtocol futureUuid = 3; - private akka.cluster.RemoteProtocol.UuidProtocol futureUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> futureUuidBuilder_; - public boolean hasFutureUuid() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public akka.cluster.RemoteProtocol.UuidProtocol getFutureUuid() { - if (futureUuidBuilder_ == null) { - return futureUuid_; - } else { - return futureUuidBuilder_.getMessage(); - } - } - public Builder setFutureUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (futureUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - futureUuid_ = value; - onChanged(); - } else { - futureUuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setFutureUuid( - akka.cluster.RemoteProtocol.UuidProtocol.Builder builderForValue) { - if (futureUuidBuilder_ == null) { - futureUuid_ = builderForValue.build(); - onChanged(); - } else { - futureUuidBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeFutureUuid(akka.cluster.RemoteProtocol.UuidProtocol value) { - if (futureUuidBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - futureUuid_ != akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance()) { - futureUuid_ = - akka.cluster.RemoteProtocol.UuidProtocol.newBuilder(futureUuid_).mergeFrom(value).buildPartial(); - } else { - futureUuid_ = value; - } - onChanged(); - } else { - futureUuidBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearFutureUuid() { - if (futureUuidBuilder_ == null) { - futureUuid_ = akka.cluster.RemoteProtocol.UuidProtocol.getDefaultInstance(); - onChanged(); - } else { - futureUuidBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - public akka.cluster.RemoteProtocol.UuidProtocol.Builder getFutureUuidBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getFutureUuidFieldBuilder().getBuilder(); - } - public akka.cluster.RemoteProtocol.UuidProtocolOrBuilder getFutureUuidOrBuilder() { - if (futureUuidBuilder_ != null) { - return futureUuidBuilder_.getMessageOrBuilder(); - } else { - return futureUuid_; - } - } - private com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder> - getFutureUuidFieldBuilder() { - if (futureUuidBuilder_ == null) { - futureUuidBuilder_ = new com.google.protobuf.SingleFieldBuilder< - akka.cluster.RemoteProtocol.UuidProtocol, akka.cluster.RemoteProtocol.UuidProtocol.Builder, akka.cluster.RemoteProtocol.UuidProtocolOrBuilder>( - futureUuid_, - getParentForChildren(), - isClean()); - futureUuid_ = null; - } - return futureUuidBuilder_; - } - - // required bytes message = 4; - private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasMessage() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getMessage() { - return message_; - } - public Builder setMessage(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - message_ = value; - onChanged(); - return this; - } - public Builder clearMessage() { - bitField0_ = (bitField0_ & ~0x00000008); - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:DurableMailboxMessageProtocol) - } - - static { - defaultInstance = new DurableMailboxMessageProtocol(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:DurableMailboxMessageProtocol) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_AkkaRemoteProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_AkkaRemoteProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_RemoteMessageProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_RemoteMessageProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_RemoteControlProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_RemoteControlProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_RemoteActorRefProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_RemoteActorRefProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_SerializedActorRefProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_SerializedActorRefProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_SerializedTypedActorRefProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_MessageProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_MessageProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_ActorInfoProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_ActorInfoProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_UuidProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_UuidProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_MetadataEntryProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_MetadataEntryProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_LifeCycleProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_LifeCycleProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_AddressProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_AddressProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_ExceptionProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_ExceptionProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_RemoteDaemonMessageProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_RemoteDaemonMessageProtocol_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_DurableMailboxMessageProtocol_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_DurableMailboxMessageProtocol_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\024RemoteProtocol.proto\"j\n\022AkkaRemoteProt" + - "ocol\022\'\n\007message\030\001 \001(\0132\026.RemoteMessagePro" + - "tocol\022+\n\013instruction\030\002 \001(\0132\026.RemoteContr" + - "olProtocol\"\257\002\n\025RemoteMessageProtocol\022\033\n\004" + - "uuid\030\001 \002(\0132\r.UuidProtocol\022%\n\tactorInfo\030\002" + - " \002(\0132\022.ActorInfoProtocol\022\016\n\006oneWay\030\003 \002(\010" + - "\022!\n\007message\030\004 \001(\0132\020.MessageProtocol\022%\n\te" + - "xception\030\005 \001(\0132\022.ExceptionProtocol\022%\n\016su" + - "pervisorUuid\030\006 \001(\0132\r.UuidProtocol\022\'\n\006sen" + - "der\030\007 \001(\0132\027.RemoteActorRefProtocol\022(\n\010me", - "tadata\030\010 \003(\0132\026.MetadataEntryProtocol\"J\n\025" + - "RemoteControlProtocol\022\016\n\006cookie\030\001 \001(\t\022!\n" + - "\013commandType\030\002 \002(\0162\014.CommandType\"U\n\026Remo" + - "teActorRefProtocol\022\017\n\007address\030\001 \002(\t\022\031\n\021i" + - "netSocketAddress\030\002 \002(\014\022\017\n\007timeout\030\003 \001(\004\"" + - "\277\003\n\032SerializedActorRefProtocol\022\033\n\004uuid\030\001" + - " \002(\0132\r.UuidProtocol\022\017\n\007address\030\002 \002(\t\022\026\n\016" + - "actorClassname\030\003 \002(\t\022\025\n\ractorInstance\030\004 " + - "\001(\014\022\033\n\023serializerClassname\030\005 \001(\t\022\017\n\007time" + - "out\030\006 \001(\004\022\026\n\016receiveTimeout\030\007 \001(\004\022%\n\tlif", - "eCycle\030\010 \001(\0132\022.LifeCycleProtocol\022+\n\nsupe" + - "rvisor\030\t \001(\0132\027.RemoteActorRefProtocol\022\024\n" + - "\014hotswapStack\030\n \001(\014\0223\n\022replicationStorag" + - "e\030\013 \001(\0162\027.ReplicationStorageType\0225\n\023repl" + - "icationStrategy\030\014 \001(\0162\030.ReplicationStrat" + - "egyType\022(\n\010messages\030\r \003(\0132\026.RemoteMessag" + - "eProtocol\"g\n\037SerializedTypedActorRefProt" + - "ocol\022-\n\010actorRef\030\001 \002(\0132\033.SerializedActor" + - "RefProtocol\022\025\n\rinterfaceName\030\002 \002(\t\";\n\017Me" + - "ssageProtocol\022\017\n\007message\030\001 \002(\014\022\027\n\017messag", - "eManifest\030\002 \001(\014\"R\n\021ActorInfoProtocol\022\033\n\004" + - "uuid\030\001 \002(\0132\r.UuidProtocol\022\017\n\007timeout\030\002 \002" + - "(\004\022\017\n\007address\030\003 \001(\t\")\n\014UuidProtocol\022\014\n\004h" + - "igh\030\001 \002(\004\022\013\n\003low\030\002 \002(\004\"3\n\025MetadataEntryP" + - "rotocol\022\013\n\003key\030\001 \002(\t\022\r\n\005value\030\002 \002(\014\"6\n\021L" + - "ifeCycleProtocol\022!\n\tlifeCycle\030\001 \002(\0162\016.Li" + - "feCycleType\"1\n\017AddressProtocol\022\020\n\010hostna" + - "me\030\001 \002(\t\022\014\n\004port\030\002 \002(\r\"7\n\021ExceptionProto" + - "col\022\021\n\tclassname\030\001 \002(\t\022\017\n\007message\030\002 \002(\t\"" + - "\304\001\n\033RemoteDaemonMessageProtocol\022-\n\013messa", - "geType\030\001 \002(\0162\030.RemoteDaemonMessageType\022 " + - "\n\tactorUuid\030\002 \001(\0132\r.UuidProtocol\022\024\n\014acto" + - "rAddress\030\003 \001(\t\022\017\n\007payload\030\005 \001(\014\022-\n\026repli" + - "cateActorFromUuid\030\006 \001(\0132\r.UuidProtocol\"\212" + - "\001\n\035DurableMailboxMessageProtocol\022\031\n\021owne" + - "rActorAddress\030\001 \002(\t\022\032\n\022senderActorAddres" + - "s\030\002 \001(\t\022!\n\nfutureUuid\030\003 \001(\0132\r.UuidProtoc" + - "ol\022\017\n\007message\030\004 \002(\014*(\n\013CommandType\022\013\n\007CO" + - "NNECT\020\001\022\014\n\010SHUTDOWN\020\002*K\n\026ReplicationStor" + - "ageType\022\r\n\tTRANSIENT\020\001\022\023\n\017TRANSACTION_LO", - "G\020\002\022\r\n\tDATA_GRID\020\003*>\n\027ReplicationStrateg" + - "yType\022\021\n\rWRITE_THROUGH\020\001\022\020\n\014WRITE_BEHIND" + - "\020\002*]\n\027SerializationSchemeType\022\010\n\004JAVA\020\001\022" + - "\013\n\007SBINARY\020\002\022\016\n\nSCALA_JSON\020\003\022\r\n\tJAVA_JSO" + - "N\020\004\022\014\n\010PROTOBUF\020\005*-\n\rLifeCycleType\022\r\n\tPE" + - "RMANENT\020\001\022\r\n\tTEMPORARY\020\002*\217\002\n\027RemoteDaemo" + - "nMessageType\022\010\n\004STOP\020\001\022\007\n\003USE\020\002\022\013\n\007RELEA" + - "SE\020\003\022\022\n\016MAKE_AVAILABLE\020\004\022\024\n\020MAKE_UNAVAIL" + - "ABLE\020\005\022\016\n\nDISCONNECT\020\006\022\r\n\tRECONNECT\020\007\022\n\n" + - "\006RESIGN\020\010\022\031\n\025FAIL_OVER_CONNECTIONS\020\t\022\026\n\022", - "FUNCTION_FUN0_UNIT\020\n\022\025\n\021FUNCTION_FUN0_AN" + - "Y\020\013\022\032\n\026FUNCTION_FUN1_ARG_UNIT\020\014\022\031\n\025FUNCT" + - "ION_FUN1_ARG_ANY\020\rB\020\n\014akka.clusterH\001" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_AkkaRemoteProtocol_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_AkkaRemoteProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_AkkaRemoteProtocol_descriptor, - new java.lang.String[] { "Message", "Instruction", }, - akka.cluster.RemoteProtocol.AkkaRemoteProtocol.class, - akka.cluster.RemoteProtocol.AkkaRemoteProtocol.Builder.class); - internal_static_RemoteMessageProtocol_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_RemoteMessageProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_RemoteMessageProtocol_descriptor, - new java.lang.String[] { "Uuid", "ActorInfo", "OneWay", "Message", "Exception", "SupervisorUuid", "Sender", "Metadata", }, - akka.cluster.RemoteProtocol.RemoteMessageProtocol.class, - akka.cluster.RemoteProtocol.RemoteMessageProtocol.Builder.class); - internal_static_RemoteControlProtocol_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_RemoteControlProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_RemoteControlProtocol_descriptor, - new java.lang.String[] { "Cookie", "CommandType", }, - akka.cluster.RemoteProtocol.RemoteControlProtocol.class, - akka.cluster.RemoteProtocol.RemoteControlProtocol.Builder.class); - internal_static_RemoteActorRefProtocol_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_RemoteActorRefProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_RemoteActorRefProtocol_descriptor, - new java.lang.String[] { "Address", "InetSocketAddress", "Timeout", }, - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.class, - akka.cluster.RemoteProtocol.RemoteActorRefProtocol.Builder.class); - internal_static_SerializedActorRefProtocol_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_SerializedActorRefProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_SerializedActorRefProtocol_descriptor, - new java.lang.String[] { "Uuid", "Address", "ActorClassname", "ActorInstance", "SerializerClassname", "Timeout", "ReceiveTimeout", "LifeCycle", "Supervisor", "HotswapStack", "ReplicationStorage", "ReplicationStrategy", "Messages", }, - akka.cluster.RemoteProtocol.SerializedActorRefProtocol.class, - akka.cluster.RemoteProtocol.SerializedActorRefProtocol.Builder.class); - internal_static_SerializedTypedActorRefProtocol_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_SerializedTypedActorRefProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_SerializedTypedActorRefProtocol_descriptor, - new java.lang.String[] { "ActorRef", "InterfaceName", }, - akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol.class, - akka.cluster.RemoteProtocol.SerializedTypedActorRefProtocol.Builder.class); - internal_static_MessageProtocol_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_MessageProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_MessageProtocol_descriptor, - new java.lang.String[] { "Message", "MessageManifest", }, - akka.cluster.RemoteProtocol.MessageProtocol.class, - akka.cluster.RemoteProtocol.MessageProtocol.Builder.class); - internal_static_ActorInfoProtocol_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_ActorInfoProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_ActorInfoProtocol_descriptor, - new java.lang.String[] { "Uuid", "Timeout", "Address", }, - akka.cluster.RemoteProtocol.ActorInfoProtocol.class, - akka.cluster.RemoteProtocol.ActorInfoProtocol.Builder.class); - internal_static_UuidProtocol_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_UuidProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_UuidProtocol_descriptor, - new java.lang.String[] { "High", "Low", }, - akka.cluster.RemoteProtocol.UuidProtocol.class, - akka.cluster.RemoteProtocol.UuidProtocol.Builder.class); - internal_static_MetadataEntryProtocol_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_MetadataEntryProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_MetadataEntryProtocol_descriptor, - new java.lang.String[] { "Key", "Value", }, - akka.cluster.RemoteProtocol.MetadataEntryProtocol.class, - akka.cluster.RemoteProtocol.MetadataEntryProtocol.Builder.class); - internal_static_LifeCycleProtocol_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_LifeCycleProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_LifeCycleProtocol_descriptor, - new java.lang.String[] { "LifeCycle", }, - akka.cluster.RemoteProtocol.LifeCycleProtocol.class, - akka.cluster.RemoteProtocol.LifeCycleProtocol.Builder.class); - internal_static_AddressProtocol_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_AddressProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_AddressProtocol_descriptor, - new java.lang.String[] { "Hostname", "Port", }, - akka.cluster.RemoteProtocol.AddressProtocol.class, - akka.cluster.RemoteProtocol.AddressProtocol.Builder.class); - internal_static_ExceptionProtocol_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_ExceptionProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_ExceptionProtocol_descriptor, - new java.lang.String[] { "Classname", "Message", }, - akka.cluster.RemoteProtocol.ExceptionProtocol.class, - akka.cluster.RemoteProtocol.ExceptionProtocol.Builder.class); - internal_static_RemoteDaemonMessageProtocol_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_RemoteDaemonMessageProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_RemoteDaemonMessageProtocol_descriptor, - new java.lang.String[] { "MessageType", "ActorUuid", "ActorAddress", "Payload", "ReplicateActorFromUuid", }, - akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol.class, - akka.cluster.RemoteProtocol.RemoteDaemonMessageProtocol.Builder.class); - internal_static_DurableMailboxMessageProtocol_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_DurableMailboxMessageProtocol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_DurableMailboxMessageProtocol_descriptor, - new java.lang.String[] { "OwnerActorAddress", "SenderActorAddress", "FutureUuid", "Message", }, - akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol.class, - akka.cluster.RemoteProtocol.DurableMailboxMessageProtocol.Builder.class); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/akka-cluster/src/main/protocol/RemoteProtocol.proto b/akka-cluster/src/main/protocol/RemoteProtocol.proto deleted file mode 100644 index 7951c7d1c9..0000000000 --- a/akka-cluster/src/main/protocol/RemoteProtocol.proto +++ /dev/null @@ -1,230 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -option java_package = "akka.cluster"; -option optimize_for = SPEED; - -/****************************************** - Compile with: - cd ./akka-cluster/src/main/protocol - protoc RemoteProtocol.proto --java_out ../java -*******************************************/ - -message AkkaRemoteProtocol { - optional RemoteMessageProtocol message = 1; - optional RemoteControlProtocol instruction = 2; -} - -/** - * Defines a remote message. - */ -message RemoteMessageProtocol { - required UuidProtocol uuid = 1; - required ActorInfoProtocol actorInfo = 2; - required bool oneWay = 3; - optional MessageProtocol message = 4; - optional ExceptionProtocol exception = 5; - optional UuidProtocol supervisorUuid = 6; - optional RemoteActorRefProtocol sender = 7; - repeated MetadataEntryProtocol metadata = 8; -} - -/** - * Defines some control messages for the remoting - */ -message RemoteControlProtocol { - optional string cookie = 1; - required CommandType commandType = 2; -} - -/** - * Defines the type of the RemoteControlProtocol command type - */ -enum CommandType { - CONNECT = 1; - SHUTDOWN = 2; -} - -/** - * Defines the type of the ReplicationStorage - */ -enum ReplicationStorageType { - TRANSIENT = 1; - TRANSACTION_LOG = 2; - DATA_GRID = 3; -} - -/** - * Defines the type of the ReplicationStrategy - */ -enum ReplicationStrategyType { - WRITE_THROUGH = 1; - WRITE_BEHIND = 2; -} - -/** - * Defines a remote ActorRef that "remembers" and uses its original Actor instance - * on the original node. - */ -message RemoteActorRefProtocol { - required string address = 1; - required bytes inetSocketAddress = 2; - optional uint64 timeout = 3; -} - -/** - * Defines a fully serialized remote ActorRef (with serialized Actor instance) - * that is about to be instantiated on the remote node. It is fully disconnected - * from its original host. - */ -message SerializedActorRefProtocol { - required UuidProtocol uuid = 1; - required string address = 2; - required string actorClassname = 3; - optional bytes actorInstance = 4; - optional string serializerClassname = 5; - optional uint64 timeout = 6; - optional uint64 receiveTimeout = 7; - optional LifeCycleProtocol lifeCycle = 8; - optional RemoteActorRefProtocol supervisor = 9; - optional bytes hotswapStack = 10; - optional ReplicationStorageType replicationStorage = 11; - optional ReplicationStrategyType replicationStrategy = 12; - repeated RemoteMessageProtocol messages = 13; -} - -/** - * Defines a fully serialized remote ActorRef (with serialized typed actor instance) - * that is about to be instantiated on the remote node. It is fully disconnected - * from its original host. - */ -message SerializedTypedActorRefProtocol { - required SerializedActorRefProtocol actorRef = 1; - required string interfaceName = 2; -} - -/** - * Defines a message. - */ -message MessageProtocol { - required bytes message = 1; - optional bytes messageManifest = 2; -} - -/** - * Defines the actor info. - */ -message ActorInfoProtocol { - required UuidProtocol uuid = 1; - required uint64 timeout = 2; - optional string address = 3; -} - -/** - * Defines a UUID. - */ -message UuidProtocol { - required uint64 high = 1; - required uint64 low = 2; -} - -/** - * Defines a meta data entry. - */ -message MetadataEntryProtocol { - required string key = 1; - required bytes value = 2; -} - -/** - * Defines the serialization scheme used to serialize the message and/or Actor instance. - */ -enum SerializationSchemeType { - JAVA = 1; - SBINARY = 2; - SCALA_JSON = 3; - JAVA_JSON = 4; - PROTOBUF = 5; -} - -/** - * Defines the type of the life-cycle of a supervised Actor. - */ -enum LifeCycleType { - PERMANENT = 1; - TEMPORARY = 2; -} - -/* -enum DispatcherType { - GLOBAL_EVENT_EXECUTOR_BASED = 1; - GLOBAL_REACTOR_SINGLE_THREAD_BASED = 2; - GLOBAL_REACTOR_THREAD_POOL_BASED = 3; - EVENT_EXECUTOR_BASED = 4; - THREAD_BASED = 5; -} -*/ - -/** - * Defines the life-cycle of a supervised Actor. - */ -message LifeCycleProtocol { - required LifeCycleType lifeCycle = 1; -} - -/** - * Defines a remote address. - */ -message AddressProtocol { - required string hostname = 1; - required uint32 port = 2; -} - -/** - * Defines an exception. - */ -message ExceptionProtocol { - required string classname = 1; - required string message = 2; -} - -/** - * Defines the remote daemon message. - */ -message RemoteDaemonMessageProtocol { - required RemoteDaemonMessageType messageType = 1; - optional UuidProtocol actorUuid = 2; - optional string actorAddress = 3; - optional bytes payload = 5; - optional UuidProtocol replicateActorFromUuid = 6; -} - -/** - * Defines the remote daemon message type. - */ -enum RemoteDaemonMessageType { - STOP = 1; - USE = 2; - RELEASE = 3; - MAKE_AVAILABLE = 4; - MAKE_UNAVAILABLE = 5; - DISCONNECT = 6; - RECONNECT = 7; - RESIGN = 8; - FAIL_OVER_CONNECTIONS = 9; - FUNCTION_FUN0_UNIT = 10; - FUNCTION_FUN0_ANY = 11; - FUNCTION_FUN1_ARG_UNIT = 12; - FUNCTION_FUN1_ARG_ANY = 13; -} - -/** - * Defines the durable mailbox message. - */ -message DurableMailboxMessageProtocol { - required string ownerActorAddress= 1; - optional string senderActorAddress = 2; - optional UuidProtocol futureUuid = 3; - required bytes message = 4; -} diff --git a/akka-cluster/src/main/scala/akka/cluster/BootableRemoteActorService.scala b/akka-cluster/src/main/scala/akka/cluster/BootableRemoteActorService.scala deleted file mode 100644 index 8d72a5e40c..0000000000 --- a/akka-cluster/src/main/scala/akka/cluster/BootableRemoteActorService.scala +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import akka.actor.{ Actor, BootableActorLoaderService } -import akka.util.{ ReflectiveAccess, Bootable } -import akka.event.EventHandler - -/** - * This bundle/service is responsible for booting up and shutting down the remote actors facility. - *

- * It is used in Kernel. - */ -trait BootableRemoteActorService extends Bootable { - self: BootableActorLoaderService ⇒ - - protected lazy val remoteServerThread = new Thread(new Runnable() { - def run = Actor.remote.start(self.applicationLoader.getOrElse(null)) //Use config host/port - }, "Akka RemoteModule Service") - - def startRemoteService() { remoteServerThread.start() } - - abstract override def onLoad() { - if (ReflectiveAccess.ClusterModule.isEnabled && RemoteServerSettings.isRemotingEnabled) { - EventHandler.info(this, "Initializing Remote Actors Service...") - startRemoteService() - EventHandler.info(this, "Remote Actors Service initialized") - } - super.onLoad() - } - - abstract override def onUnload() { - EventHandler.info(this, "Shutting down Remote Actors Service") - - Actor.remote.shutdown() - if (remoteServerThread.isAlive) remoteServerThread.join(1000) - EventHandler.info(this, "Remote Actors Service has been shut down") - super.onUnload() - } -} diff --git a/akka-cluster/src/main/scala/akka/cluster/MessageSerializer.scala b/akka-cluster/src/main/scala/akka/cluster/MessageSerializer.scala deleted file mode 100644 index a8a2f15678..0000000000 --- a/akka-cluster/src/main/scala/akka/cluster/MessageSerializer.scala +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import akka.cluster.RemoteProtocol._ -import akka.serialization.Serialization - -import com.google.protobuf.ByteString - -object MessageSerializer { - - def deserialize(messageProtocol: MessageProtocol, classLoader: Option[ClassLoader] = None): AnyRef = { - val clazz = loadManifest(classLoader, messageProtocol) - Serialization.deserialize(messageProtocol.getMessage.toByteArray, - clazz, classLoader).fold(x ⇒ throw x, o ⇒ o) - } - - def serialize(message: AnyRef): MessageProtocol = { - val builder = MessageProtocol.newBuilder - val bytes = Serialization.serialize(message).fold(x ⇒ throw x, b ⇒ b) - builder.setMessage(ByteString.copyFrom(bytes)) - builder.setMessageManifest(ByteString.copyFromUtf8(message.getClass.getName)) - builder.build - } - - private def loadManifest(classLoader: Option[ClassLoader], messageProtocol: MessageProtocol): Class[_] = { - val manifest = messageProtocol.getMessageManifest.toStringUtf8 - classLoader map (_.loadClass(manifest)) getOrElse (Class.forName(manifest)) - } -} diff --git a/akka-cluster/src/main/scala/akka/cluster/RemoteConfig.scala b/akka-cluster/src/main/scala/akka/cluster/RemoteConfig.scala deleted file mode 100644 index 34a77539b7..0000000000 --- a/akka-cluster/src/main/scala/akka/cluster/RemoteConfig.scala +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import akka.util.Duration -import akka.config.Config._ -import akka.config.ConfigurationException - -object RemoteClientSettings { - val SECURE_COOKIE: Option[String] = config.getString("akka.cluster.secure-cookie", "") match { - case "" ⇒ None - case cookie ⇒ Some(cookie) - } - - val RECONNECTION_TIME_WINDOW = Duration(config.getInt("akka.cluster.client.reconnection-time-window", 600), TIME_UNIT).toMillis - val READ_TIMEOUT = Duration(config.getInt("akka.cluster.client.read-timeout", 3600), TIME_UNIT) - val RECONNECT_DELAY = Duration(config.getInt("akka.cluster.client.reconnect-delay", 5), TIME_UNIT) - val REAP_FUTURES_DELAY = Duration(config.getInt("akka.cluster.client.reap-futures-delay", 5), TIME_UNIT) - val MESSAGE_FRAME_SIZE = config.getInt("akka.cluster.client.message-frame-size", 1048576) -} - -object RemoteServerSettings { - val isRemotingEnabled = config.getList("akka.enabled-modules").exists(_ == "cluster") - val MESSAGE_FRAME_SIZE = config.getInt("akka.cluster.server.message-frame-size", 1048576) - val SECURE_COOKIE = config.getString("akka.cluster.secure-cookie") - val REQUIRE_COOKIE = { - val requireCookie = config.getBool("akka.cluster.server.require-cookie", false) - if (isRemotingEnabled && requireCookie && SECURE_COOKIE.isEmpty) throw new ConfigurationException( - "Configuration option 'akka.cluster.server.require-cookie' is turned on but no secure cookie is defined in 'akka.cluster.secure-cookie'.") - requireCookie - } - - val UNTRUSTED_MODE = config.getBool("akka.cluster.server.untrusted-mode", false) - val PORT = config.getInt("akka.cluster.server.port", 2552) - val CONNECTION_TIMEOUT = Duration(config.getInt("akka.cluster.server.connection-timeout", 100), TIME_UNIT) - val COMPRESSION_SCHEME = config.getString("akka.cluster.compression-scheme", "") - val ZLIB_COMPRESSION_LEVEL = { - val level = config.getInt("akka.cluster.zlib-compression-level", 6) - if (level < 1 && level > 9) throw new IllegalArgumentException( - "zlib compression level has to be within 1-9, with 1 being fastest and 9 being the most compressed") - level - } - - val BACKLOG = config.getInt("akka.cluster.server.backlog", 4096) - - val EXECUTION_POOL_KEEPALIVE = Duration(config.getInt("akka.cluster.server.execution-pool-keepalive", 60), TIME_UNIT) - - val EXECUTION_POOL_SIZE = { - val sz = config.getInt("akka.cluster.server.execution-pool-size", 16) - if (sz < 1) throw new IllegalArgumentException("akka.cluster.server.execution-pool-size is less than 1") - sz - } - - val MAX_CHANNEL_MEMORY_SIZE = { - val sz = config.getInt("akka.cluster.server.max-channel-memory-size", 0) - if (sz < 0) throw new IllegalArgumentException("akka.cluster.server.max-channel-memory-size is less than 0") - sz - } - - val MAX_TOTAL_MEMORY_SIZE = { - val sz = config.getInt("akka.cluster.server.max-total-memory-size", 0) - if (sz < 0) throw new IllegalArgumentException("akka.cluster.server.max-total-memory-size is less than 0") - sz - } -} diff --git a/akka-cluster/src/main/scala/akka/cluster/RemoteFailureDetector.scala b/akka-cluster/src/main/scala/akka/cluster/RemoteFailureDetector.scala deleted file mode 100644 index 6f64b9dce3..0000000000 --- a/akka-cluster/src/main/scala/akka/cluster/RemoteFailureDetector.scala +++ /dev/null @@ -1,389 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import akka.actor.{ Actor, ActorRef, Props } -import Actor._ -import akka.cluster._ -import akka.routing._ -import akka.event.EventHandler -import akka.dispatch.{ Dispatchers, Future, PinnedDispatcher } -import akka.util.{ ListenerManagement, Duration } - -import scala.collection.immutable.Map -import scala.collection.mutable -import scala.annotation.tailrec - -import java.net.InetSocketAddress -import java.util.concurrent.atomic.AtomicReference -import System.{ currentTimeMillis ⇒ newTimestamp } - -/** - * Holds error event channel Actor instance and provides API for channel listener management. - */ -object RemoteFailureDetector { - - private sealed trait RemoteFailureDetectorChannelEvent - - private case class Register(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) - extends RemoteFailureDetectorChannelEvent - - private case class Unregister(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) - extends RemoteFailureDetectorChannelEvent - - private[akka] val channel = actorOf(Props(new Channel).copy(dispatcher = new PinnedDispatcher(), localOnly = true)) - - def register(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) = - channel ! Register(listener, connectionAddress) - - def unregister(listener: RemoteFailureListener, connectionAddress: InetSocketAddress) = - channel ! Unregister(listener, connectionAddress) - - private class Channel extends Actor { - - val listeners = new mutable.HashMap[InetSocketAddress, mutable.Set[RemoteFailureListener]]() { - override def default(k: InetSocketAddress) = mutable.Set.empty[RemoteFailureListener] - } - - def receive = { - case event: RemoteClientLifeCycleEvent ⇒ - listeners(event.remoteAddress) foreach (_ notify event) - - case event: RemoteServerLifeCycleEvent ⇒ // FIXME handle RemoteServerLifeCycleEvent - - case Register(listener, connectionAddress) ⇒ - listeners(connectionAddress) += listener - - case Unregister(listener, connectionAddress) ⇒ - listeners(connectionAddress) -= listener - - case _ ⇒ //ignore other - } - } -} - -/** - * Base class for remote failure detection management. - */ -abstract class RemoteFailureDetectorBase(initialConnections: Map[InetSocketAddress, ActorRef]) - extends FailureDetector - with RemoteFailureListener { - - import ClusterActorRef._ - - type T <: AnyRef - - protected case class State( - version: Long, - connections: Map[InetSocketAddress, ActorRef], - meta: T = null.asInstanceOf[T]) - extends VersionedIterable[ActorRef] { - def iterable: Iterable[ActorRef] = connections.values - } - - protected val state: AtomicReference[State] = { - val ref = new AtomicReference[State] - ref set newState() - ref - } - - /** - * State factory. To be defined by subclass that wants to add extra info in the 'meta: Option[T]' field. - */ - protected def newState(): State - - /** - * Returns true if the 'connection' is considered available. - * - * To be implemented by subclass. - */ - def isAvailable(connectionAddress: InetSocketAddress): Boolean - - /** - * Records a successful connection. - * - * To be implemented by subclass. - */ - def recordSuccess(connectionAddress: InetSocketAddress, timestamp: Long) - - /** - * Records a failed connection. - * - * To be implemented by subclass. - */ - def recordFailure(connectionAddress: InetSocketAddress, timestamp: Long) - - def version: Long = state.get.version - - def versionedIterable = state.get - - def size: Int = state.get.connections.size - - def connections: Map[InetSocketAddress, ActorRef] = state.get.connections - - def stopAll() { - state.get.iterable foreach (_.stop()) // shut down all remote connections - } - - @tailrec - final def failOver(from: InetSocketAddress, to: InetSocketAddress) { - EventHandler.debug(this, "ClusterActorRef failover from [%s] to [%s]".format(from, to)) - - val oldState = state.get - var changed = false - - val newMap = oldState.connections map { - case (`from`, actorRef) ⇒ - changed = true - //actorRef.stop() - (to, createRemoteActorRef(actorRef.address, to)) - case other ⇒ other - } - - if (changed) { - //there was a state change, so we are now going to update the state. - val newState = oldState copy (version = oldState.version + 1, connections = newMap) - - //if we are not able to update, the state, we are going to try again. - if (!state.compareAndSet(oldState, newState)) failOver(from, to) - } - } - - @tailrec - final def remove(faultyConnection: ActorRef) { - EventHandler.debug(this, "ClusterActorRef remove [%s]".format(faultyConnection.uuid)) - - val oldState = state.get() - var changed = false - - //remote the faultyConnection from the clustered-connections. - var newConnections = Map.empty[InetSocketAddress, ActorRef] - oldState.connections.keys foreach { address ⇒ - val actorRef: ActorRef = oldState.connections.get(address).get - if (actorRef ne faultyConnection) { - newConnections = newConnections + ((address, actorRef)) - } else { - changed = true - } - } - - if (changed) { - //one or more occurrances of the actorRef were removed, so we need to update the state. - val newState = oldState copy (version = oldState.version + 1, connections = newConnections) - - //if we are not able to update the state, we just try again. - if (!state.compareAndSet(oldState, newState)) remove(faultyConnection) - } - } -} - -/** - * Simple failure detector that removes the failing connection permanently on first error. - */ -class RemoveConnectionOnFirstFailureRemoteFailureDetector( - initialConnections: Map[InetSocketAddress, ActorRef]) - extends RemoteFailureDetectorBase(initialConnections) { - - protected def newState() = State(Long.MinValue, initialConnections) - - def isAvailable(connectionAddress: InetSocketAddress): Boolean = connections.get(connectionAddress).isDefined - - def recordSuccess(connectionAddress: InetSocketAddress, timestamp: Long) {} - - def recordFailure(connectionAddress: InetSocketAddress, timestamp: Long) {} - - override def remoteClientWriteFailed( - request: AnyRef, cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } - - override def remoteClientError(cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } - - override def remoteClientDisconnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } - - override def remoteClientShutdown(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - removeConnection(connectionAddress) - } - - private def removeConnection(connectionAddress: InetSocketAddress) = - connections.get(connectionAddress) foreach { conn ⇒ remove(conn) } -} - -/** - * Failure detector that bans the failing connection for 'timeToBan: Duration' and will try to use the connection - * again after the ban period have expired. - */ -class BannagePeriodFailureDetector( - initialConnections: Map[InetSocketAddress, ActorRef], - timeToBan: Duration) - extends RemoteFailureDetectorBase(initialConnections) { - - // FIXME considering adding a Scheduler event to notify the BannagePeriodFailureDetector unban the banned connection after the timeToBan have exprired - - type T = Map[InetSocketAddress, BannedConnection] - - case class BannedConnection(bannedSince: Long, connection: ActorRef) - - val timeToBanInMillis = timeToBan.toMillis - - protected def newState() = - State(Long.MinValue, initialConnections, Map.empty[InetSocketAddress, BannedConnection]) - - private def removeConnection(connectionAddress: InetSocketAddress) = - connections.get(connectionAddress) foreach { conn ⇒ remove(conn) } - - // =================================================================================== - // FailureDetector callbacks - // =================================================================================== - - def isAvailable(connectionAddress: InetSocketAddress): Boolean = connections.get(connectionAddress).isDefined - - @tailrec - final def recordSuccess(connectionAddress: InetSocketAddress, timestamp: Long) { - val oldState = state.get - val bannedConnection = oldState.meta.get(connectionAddress) - - if (bannedConnection.isDefined) { - val BannedConnection(bannedSince, connection) = bannedConnection.get - val currentlyBannedFor = newTimestamp - bannedSince - - if (currentlyBannedFor > timeToBanInMillis) { - // ban time has expired - add connection to available connections - val newConnections = oldState.connections + (connectionAddress -> connection) - val newBannedConnections = oldState.meta - connectionAddress - - val newState = oldState copy (version = oldState.version + 1, - connections = newConnections, - meta = newBannedConnections) - - if (!state.compareAndSet(oldState, newState)) recordSuccess(connectionAddress, timestamp) - } - } - } - - @tailrec - final def recordFailure(connectionAddress: InetSocketAddress, timestamp: Long) { - val oldState = state.get - val connection = oldState.connections.get(connectionAddress) - - if (connection.isDefined) { - val newConnections = oldState.connections - connectionAddress - val bannedConnection = BannedConnection(timestamp, connection.get) - val newBannedConnections = oldState.meta + (connectionAddress -> bannedConnection) - - val newState = oldState copy (version = oldState.version + 1, - connections = newConnections, - meta = newBannedConnections) - - if (!state.compareAndSet(oldState, newState)) recordFailure(connectionAddress, timestamp) - } - } - - // =================================================================================== - // RemoteFailureListener callbacks - // =================================================================================== - - override def remoteClientStarted(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordSuccess(connectionAddress, newTimestamp) - } - - override def remoteClientConnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordSuccess(connectionAddress, newTimestamp) - } - - override def remoteClientWriteFailed( - request: AnyRef, cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } - - override def remoteClientError(cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } - - override def remoteClientDisconnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } - - override def remoteClientShutdown(client: RemoteClientModule, connectionAddress: InetSocketAddress) { - recordFailure(connectionAddress, newTimestamp) - } -} - -/** - * Failure detector that uses the Circuit Breaker pattern to detect and recover from failing connections. - * - * class CircuitBreakerRemoteFailureListener(initialConnections: Map[InetSocketAddress, ActorRef]) - * extends RemoteFailureDetectorBase(initialConnections) { - * - * def newState() = State(Long.MinValue, initialConnections, None) - * - * def isAvailable(connectionAddress: InetSocketAddress): Boolean = connections.get(connectionAddress).isDefined - * - * def recordSuccess(connectionAddress: InetSocketAddress, timestamp: Long) {} - * - * def recordFailure(connectionAddress: InetSocketAddress, timestamp: Long) {} - * - * // FIXME implement CircuitBreakerRemoteFailureListener - * } - */ - -/** - * Base trait for remote failure event listener. - */ -trait RemoteFailureListener { - - final private[akka] def notify(event: RemoteLifeCycleEvent) = event match { - case RemoteClientStarted(client, connectionAddress) ⇒ - remoteClientStarted(client, connectionAddress) - - case RemoteClientConnected(client, connectionAddress) ⇒ - remoteClientConnected(client, connectionAddress) - - case RemoteClientWriteFailed(request, cause, client, connectionAddress) ⇒ - remoteClientWriteFailed(request, cause, client, connectionAddress) - - case RemoteClientError(cause, client, connectionAddress) ⇒ - remoteClientError(cause, client, connectionAddress) - - case RemoteClientDisconnected(client, connectionAddress) ⇒ - remoteClientDisconnected(client, connectionAddress) - - case RemoteClientShutdown(client, connectionAddress) ⇒ - remoteClientShutdown(client, connectionAddress) - - case RemoteServerWriteFailed(request, cause, server, clientAddress) ⇒ - remoteServerWriteFailed(request, cause, server, clientAddress) - - case RemoteServerError(cause, server) ⇒ - remoteServerError(cause, server) - - case RemoteServerShutdown(server) ⇒ - remoteServerShutdown(server) - } - - def remoteClientStarted(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientConnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientWriteFailed( - request: AnyRef, cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientError(cause: Throwable, client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientDisconnected(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteClientShutdown(client: RemoteClientModule, connectionAddress: InetSocketAddress) {} - - def remoteServerWriteFailed( - request: AnyRef, cause: Throwable, server: RemoteServerModule, clientAddress: Option[InetSocketAddress]) {} - - def remoteServerError(cause: Throwable, server: RemoteServerModule) {} - - def remoteServerShutdown(server: RemoteServerModule) {} -} diff --git a/akka-cluster/src/main/scala/akka/cluster/netty/NettyRemoteSupport.scala b/akka-cluster/src/main/scala/akka/cluster/netty/NettyRemoteSupport.scala deleted file mode 100644 index 451c43f17f..0000000000 --- a/akka-cluster/src/main/scala/akka/cluster/netty/NettyRemoteSupport.scala +++ /dev/null @@ -1,1152 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster.netty - -import akka.dispatch.{ ActorPromise, DefaultPromise, Promise } -import akka.cluster.{ MessageSerializer, RemoteClientSettings, RemoteServerSettings } -import akka.cluster.RemoteProtocol._ -import akka.serialization.RemoteActorSerialization -import akka.serialization.RemoteActorSerialization._ -import akka.cluster._ -import akka.actor.{ - PoisonPill, - Actor, - RemoteActorRef, - ActorRef, - IllegalActorStateException, - RemoteActorSystemMessage, - uuidFrom, - Uuid, - LifeCycleMessage, - Address -} -import akka.actor.Actor._ -import akka.config.Config -import Config._ -import akka.util._ -import akka.event.EventHandler - -import org.jboss.netty.channel._ -import org.jboss.netty.channel.group.{ DefaultChannelGroup, ChannelGroup, ChannelGroupFuture } -import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory -import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory -import org.jboss.netty.bootstrap.{ ServerBootstrap, ClientBootstrap } -import org.jboss.netty.handler.codec.frame.{ LengthFieldBasedFrameDecoder, LengthFieldPrepender } -import org.jboss.netty.handler.codec.compression.{ ZlibDecoder, ZlibEncoder } -import org.jboss.netty.handler.codec.protobuf.{ ProtobufDecoder, ProtobufEncoder } -import org.jboss.netty.handler.timeout.{ ReadTimeoutHandler, ReadTimeoutException } -import org.jboss.netty.handler.execution.{ OrderedMemoryAwareThreadPoolExecutor, ExecutionHandler } -import org.jboss.netty.util.{ TimerTask, Timeout, HashedWheelTimer } - -import scala.collection.mutable.HashMap -import scala.collection.JavaConversions._ - -import java.net.InetSocketAddress -import java.util.concurrent.atomic.{ AtomicReference, AtomicBoolean } -import java.util.concurrent._ -import akka.AkkaException - -class RemoteClientMessageBufferException(message: String, cause: Throwable = null) extends AkkaException(message, cause) { - def this(msg: String) = this(msg, null); -} - -object RemoteEncoder { - def encode(rmp: RemoteMessageProtocol): AkkaRemoteProtocol = { - val arp = AkkaRemoteProtocol.newBuilder - arp.setMessage(rmp) - arp.build - } - - def encode(rcp: RemoteControlProtocol): AkkaRemoteProtocol = { - val arp = AkkaRemoteProtocol.newBuilder - arp.setInstruction(rcp) - arp.build - } -} - -trait NettyRemoteClientModule extends RemoteClientModule { - self: ListenerManagement ⇒ - private val remoteClients = new HashMap[RemoteAddress, RemoteClient] - private val remoteActors = new Index[RemoteAddress, Uuid] - private val lock = new ReadWriteGuard - - protected[akka] def send[T](message: Any, - senderOption: Option[ActorRef], - senderFuture: Option[Promise[T]], - remoteAddress: InetSocketAddress, - timeout: Long, - isOneWay: Boolean, - actorRef: ActorRef, - loader: Option[ClassLoader]): Option[Promise[T]] = - withClientFor(remoteAddress, loader) { client ⇒ - client.send[T](message, senderOption, senderFuture, remoteAddress, timeout, isOneWay, actorRef) - } - - private[akka] def withClientFor[T]( - address: InetSocketAddress, loader: Option[ClassLoader])(body: RemoteClient ⇒ T): T = { - // loader.foreach(MessageSerializer.setClassLoader(_)) - val key = RemoteAddress(address) - lock.readLock.lock - try { - val client = remoteClients.get(key) match { - case Some(client) ⇒ client - case None ⇒ - lock.readLock.unlock - lock.writeLock.lock //Lock upgrade, not supported natively - try { - try { - remoteClients.get(key) match { - //Recheck for addition, race between upgrades - case Some(client) ⇒ client //If already populated by other writer - case None ⇒ //Populate map - val client = new ActiveRemoteClient(this, address, loader, self.notifyListeners _) - client.connect() - remoteClients += key -> client - client - } - } finally { - lock.readLock.lock - } //downgrade - } finally { - lock.writeLock.unlock - } - } - body(client) - } finally { - lock.readLock.unlock - } - } - - def shutdownClientConnection(address: InetSocketAddress): Boolean = lock withWriteGuard { - remoteClients.remove(RemoteAddress(address)) match { - case Some(client) ⇒ client.shutdown() - case None ⇒ false - } - } - - def restartClientConnection(address: InetSocketAddress): Boolean = lock withReadGuard { - remoteClients.get(RemoteAddress(address)) match { - case Some(client) ⇒ client.connect(reconnectIfAlreadyConnected = true) - case None ⇒ false - } - } - - /** - * Clean-up all open connections. - */ - def shutdownClientModule() { - shutdownRemoteClients() - //TODO: Should we empty our remoteActors too? - //remoteActors.clear - } - - def shutdownRemoteClients() = lock withWriteGuard { - remoteClients.foreach({ - case (addr, client) ⇒ client.shutdown() - }) - remoteClients.clear() - } -} - -/** - * This is the abstract baseclass for netty remote clients, currently there's only an - * ActiveRemoteClient, but others could be feasible, like a PassiveRemoteClient that - * reuses an already established connection. - */ -abstract class RemoteClient private[akka] ( - val module: NettyRemoteClientModule, - val remoteAddress: InetSocketAddress) { - - val useTransactionLog = config.getBool("akka.cluster.client.buffering.retry-message-send-on-failure", false) - val transactionLogCapacity = config.getInt("akka.cluster.client.buffering.capacity", -1) - - val name = this.getClass.getSimpleName + "@" + - remoteAddress.getAddress.getHostAddress + "::" + - remoteAddress.getPort - - protected val futures = new ConcurrentHashMap[Uuid, Promise[_]] - protected val pendingRequests = { - if (transactionLogCapacity < 0) new ConcurrentLinkedQueue[(Boolean, Uuid, RemoteMessageProtocol)] - else new LinkedBlockingQueue[(Boolean, Uuid, RemoteMessageProtocol)](transactionLogCapacity) - } - - private[cluster] val runSwitch = new Switch() - - private[cluster] def isRunning = runSwitch.isOn - - protected def notifyListeners(msg: ⇒ Any): Unit - - protected def currentChannel: Channel - - def connect(reconnectIfAlreadyConnected: Boolean = false): Boolean - - def shutdown(): Boolean - - /** - * Returns an array with the current pending messages not yet delivered. - */ - def pendingMessages: Array[Any] = { - var messages = Vector[Any]() - val iter = pendingRequests.iterator - while (iter.hasNext) { - val (_, _, message) = iter.next - messages = messages :+ MessageSerializer.deserialize(message.getMessage) - } - messages.toArray - } - - /** - * Converts the message to the wireprotocol and sends the message across the wire - */ - def send[T]( - message: Any, - senderOption: Option[ActorRef], - senderFuture: Option[Promise[T]], - remoteAddress: InetSocketAddress, - timeout: Long, - isOneWay: Boolean, - actorRef: ActorRef): Option[Promise[T]] = { - val messageProtocol = createRemoteMessageProtocolBuilder( - Some(actorRef), Left(actorRef.uuid), actorRef.address, timeout, Right(message), isOneWay, senderOption).build - send(messageProtocol, senderFuture) - } - - /** - * Sends the message across the wire - */ - def send[T]( - request: RemoteMessageProtocol, - senderFuture: Option[Promise[T]]): Option[Promise[T]] = { - - if (isRunning) { - EventHandler.debug(this, "Sending to connection [%s] message [\n%s]".format(remoteAddress, request)) - - // tell - if (request.getOneWay) { - try { - val future = currentChannel.write(RemoteEncoder.encode(request)) - future.awaitUninterruptibly() - if (!future.isCancelled && !future.isSuccess) { - notifyListeners(RemoteClientWriteFailed(request, future.getCause, module, remoteAddress)) - } - } catch { - case e: Exception ⇒ - notifyListeners(RemoteClientError(e, module, remoteAddress)) - - if (useTransactionLog && !pendingRequests.offer((true, null, request))) { // Add the request to the tx log after a failing send - pendingRequests.clear() - throw new RemoteClientMessageBufferException("Buffer limit [" + transactionLogCapacity + "] reached") - } - } - None - - // ask - } else { - val futureResult = - if (senderFuture.isDefined) senderFuture.get - else new DefaultPromise[T](request.getActorInfo.getTimeout) - - val futureUuid = uuidFrom(request.getUuid.getHigh, request.getUuid.getLow) - futures.put(futureUuid, futureResult) // Add future prematurely, remove it if write fails - - def handleRequestReplyError(future: ChannelFuture) = { - if (useTransactionLog && !pendingRequests.offer((false, futureUuid, request))) { // Add the request to the tx log after a failing send - pendingRequests.clear() - throw new RemoteClientMessageBufferException("Buffer limit [" + transactionLogCapacity + "] reached") - - } else { - val f = futures.remove(futureUuid) // Clean up future - if (f ne null) f.completeWithException(future.getCause) - } - } - - var future: ChannelFuture = null - try { - // try to send the original one - future = currentChannel.write(RemoteEncoder.encode(request)) - future.awaitUninterruptibly() - - if (future.isCancelled || !future.isSuccess) { - notifyListeners(RemoteClientWriteFailed(request, future.getCause, module, remoteAddress)) - handleRequestReplyError(future) - } - - } catch { - case e: Exception ⇒ - notifyListeners(RemoteClientWriteFailed(request, e, module, remoteAddress)) - handleRequestReplyError(future) - } - Some(futureResult) - } - - } else { - val exception = new RemoteClientException("RemoteModule client is not running, make sure you have invoked 'RemoteClient.connect()' before using it.", module, remoteAddress) - notifyListeners(RemoteClientError(exception, module, remoteAddress)) - throw exception - } - } - - private[cluster] def sendPendingRequests() = pendingRequests synchronized { - // ensure only one thread at a time can flush the log - val nrOfMessages = pendingRequests.size - if (nrOfMessages > 0) EventHandler.info(this, "Resending [%s] previously failed messages after remote client reconnect" format nrOfMessages) - var pendingRequest = pendingRequests.peek - - while (pendingRequest ne null) { - val (isOneWay, futureUuid, message) = pendingRequest - - if (isOneWay) { - // tell - val future = currentChannel.write(RemoteEncoder.encode(message)) - future.awaitUninterruptibly() - - if (future.isCancelled && !future.isSuccess) { - notifyListeners(RemoteClientWriteFailed(message, future.getCause, module, remoteAddress)) - } - - } else { - // ask - val future = currentChannel.write(RemoteEncoder.encode(message)) - future.awaitUninterruptibly() - - if (future.isCancelled || !future.isSuccess) { - val f = futures.remove(futureUuid) // Clean up future - if (f ne null) f.completeWithException(future.getCause) - notifyListeners(RemoteClientWriteFailed(message, future.getCause, module, remoteAddress)) - } - } - - pendingRequests.remove(pendingRequest) - pendingRequest = pendingRequests.peek // try to grab next message - } - } -} - -/** - * RemoteClient represents a connection to an Akka node. Is used to send messages to remote actors on the node. - * - * @author Jonas Bonér - */ -class ActiveRemoteClient private[akka] ( - module: NettyRemoteClientModule, remoteAddress: InetSocketAddress, - val loader: Option[ClassLoader] = None, notifyListenersFun: (⇒ Any) ⇒ Unit) extends RemoteClient(module, remoteAddress) { - - import RemoteClientSettings._ - - //FIXME rewrite to a wrapper object (minimize volatile access and maximize encapsulation) - @volatile - private var bootstrap: ClientBootstrap = _ - @volatile - private[cluster] var connection: ChannelFuture = _ - @volatile - private[cluster] var openChannels: DefaultChannelGroup = _ - @volatile - private var timer: HashedWheelTimer = _ - @volatile - private var reconnectionTimeWindowStart = 0L - - def notifyListeners(msg: ⇒ Any): Unit = notifyListenersFun(msg) - - def currentChannel = connection.getChannel - - /** - * Connect to remote server. - */ - def connect(reconnectIfAlreadyConnected: Boolean = false): Boolean = { - - def sendSecureCookie(connection: ChannelFuture) { - val handshake = RemoteControlProtocol.newBuilder.setCommandType(CommandType.CONNECT) - if (SECURE_COOKIE.nonEmpty) handshake.setCookie(SECURE_COOKIE.get) - connection.getChannel.write(RemoteEncoder.encode(handshake.build)) - } - - def closeChannel(connection: ChannelFuture) = { - val channel = connection.getChannel - openChannels.remove(channel) - channel.close - } - - def attemptReconnect(): Boolean = { - EventHandler.debug(this, "Remote client reconnecting to [%s]".format(remoteAddress)) - - val connection = bootstrap.connect(remoteAddress) - openChannels.add(connection.awaitUninterruptibly.getChannel) // Wait until the connection attempt succeeds or fails. - - if (!connection.isSuccess) { - notifyListeners(RemoteClientError(connection.getCause, module, remoteAddress)) - EventHandler.error(connection.getCause, this, "Reconnection to [%s] has failed".format(remoteAddress)) - false - - } else { - sendSecureCookie(connection) - true - } - } - - runSwitch switchOn { - openChannels = new DefaultDisposableChannelGroup(classOf[RemoteClient].getName) - timer = new HashedWheelTimer - - bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(Executors.newCachedThreadPool, Executors.newCachedThreadPool)) - bootstrap.setPipelineFactory(new ActiveRemoteClientPipelineFactory(name, futures, bootstrap, remoteAddress, timer, this)) - bootstrap.setOption("tcpNoDelay", true) - bootstrap.setOption("keepAlive", true) - - EventHandler.debug(this, "Starting remote client connection to [%s]".format(remoteAddress)) - - connection = bootstrap.connect(remoteAddress) - - val channel = connection.awaitUninterruptibly.getChannel - openChannels.add(channel) - - if (!connection.isSuccess) { - notifyListeners(RemoteClientError(connection.getCause, module, remoteAddress)) - EventHandler.error(connection.getCause, this, "Remote client connection to [%s] has failed".format(remoteAddress)) - false - - } else { - sendSecureCookie(connection) - - //Add a task that does GCing of expired Futures - timer.newTimeout(new TimerTask() { - def run(timeout: Timeout) = { - if (isRunning) { - val i = futures.entrySet.iterator - while (i.hasNext) { - val e = i.next - if (e.getValue.isExpired) - futures.remove(e.getKey) - } - } - } - }, RemoteClientSettings.REAP_FUTURES_DELAY.length, RemoteClientSettings.REAP_FUTURES_DELAY.unit) - notifyListeners(RemoteClientStarted(module, remoteAddress)) - true - } - } match { - case true ⇒ true - case false if reconnectIfAlreadyConnected ⇒ - closeChannel(connection) - - EventHandler.debug(this, "Remote client reconnecting to [%s]".format(remoteAddress)) - attemptReconnect() - - case false ⇒ false - } - } - - // Please note that this method does _not_ remove the ARC from the NettyRemoteClientModule's map of clients - def shutdown() = runSwitch switchOff { - EventHandler.info(this, "Shutting down remote client [%s]".format(name)) - - notifyListeners(RemoteClientShutdown(module, remoteAddress)) - timer.stop() - timer = null - openChannels.close.awaitUninterruptibly - openChannels = null - bootstrap.releaseExternalResources() - bootstrap = null - connection = null - pendingRequests.clear() - - EventHandler.info(this, "[%s] has been shut down".format(name)) - } - - private[akka] def isWithinReconnectionTimeWindow: Boolean = { - if (reconnectionTimeWindowStart == 0L) { - reconnectionTimeWindowStart = System.currentTimeMillis - true - } else { - val timeLeft = (RECONNECTION_TIME_WINDOW - (System.currentTimeMillis - reconnectionTimeWindowStart)) > 0 - if (timeLeft) { - EventHandler.info(this, "Will try to reconnect to remote server for another [%s] milliseconds".format(timeLeft)) - } - timeLeft - } - } - - private[akka] def resetReconnectionTimeWindow = reconnectionTimeWindowStart = 0L -} - -/** - * @author Jonas Bonér - */ -class ActiveRemoteClientPipelineFactory( - name: String, - futures: ConcurrentMap[Uuid, Promise[_]], - bootstrap: ClientBootstrap, - remoteAddress: InetSocketAddress, - timer: HashedWheelTimer, - client: ActiveRemoteClient) extends ChannelPipelineFactory { - - def getPipeline: ChannelPipeline = { - val timeout = new ReadTimeoutHandler(timer, RemoteClientSettings.READ_TIMEOUT.length, RemoteClientSettings.READ_TIMEOUT.unit) - val lenDec = new LengthFieldBasedFrameDecoder(RemoteClientSettings.MESSAGE_FRAME_SIZE, 0, 4, 0, 4) - val lenPrep = new LengthFieldPrepender(4) - val protobufDec = new ProtobufDecoder(AkkaRemoteProtocol.getDefaultInstance) - val protobufEnc = new ProtobufEncoder - val (enc, dec) = RemoteServerSettings.COMPRESSION_SCHEME match { - case "zlib" ⇒ (new ZlibEncoder(RemoteServerSettings.ZLIB_COMPRESSION_LEVEL) :: Nil, new ZlibDecoder :: Nil) - case _ ⇒ (Nil, Nil) - } - - val remoteClient = new ActiveRemoteClientHandler(name, futures, bootstrap, remoteAddress, timer, client) - val stages: List[ChannelHandler] = timeout :: dec ::: lenDec :: protobufDec :: enc ::: lenPrep :: protobufEnc :: remoteClient :: Nil - new StaticChannelPipeline(stages: _*) - } -} - -/** - * @author Jonas Bonér - */ -@ChannelHandler.Sharable -class ActiveRemoteClientHandler( - val name: String, - val futures: ConcurrentMap[Uuid, Promise[_]], - val bootstrap: ClientBootstrap, - val remoteAddress: InetSocketAddress, - val timer: HashedWheelTimer, - val client: ActiveRemoteClient) - extends SimpleChannelUpstreamHandler { - - override def messageReceived(ctx: ChannelHandlerContext, event: MessageEvent) { - try { - event.getMessage match { - case arp: AkkaRemoteProtocol if arp.hasInstruction ⇒ - val rcp = arp.getInstruction - rcp.getCommandType match { - case CommandType.SHUTDOWN ⇒ spawn { - client.module.shutdownClientConnection(remoteAddress) - } - } - - case arp: AkkaRemoteProtocol if arp.hasMessage ⇒ - val reply = arp.getMessage - val replyUuid = uuidFrom(reply.getActorInfo.getUuid.getHigh, reply.getActorInfo.getUuid.getLow) - EventHandler.debug(this, "Remote client received RemoteMessageProtocol[\n%s]\nTrying to map back to future: %s".format(reply, replyUuid)) - - futures.remove(replyUuid).asInstanceOf[Promise[Any]] match { - case null ⇒ - client.notifyListeners(RemoteClientError(new IllegalActorStateException("Future mapped to UUID " + replyUuid + " does not exist"), client.module, client.remoteAddress)) - - case future ⇒ - if (reply.hasMessage) { - val message = MessageSerializer.deserialize(reply.getMessage) - future.completeWithResult(message) - } else { - future.completeWithException(parseException(reply, client.loader)) - } - } - - case other ⇒ - throw new RemoteClientException("Unknown message received in remote client handler: " + other, client.module, client.remoteAddress) - } - } catch { - case e: Exception ⇒ - EventHandler.error(e, this, e.getMessage) - client.notifyListeners(RemoteClientError(e, client.module, client.remoteAddress)) - } - } - - override def channelClosed(ctx: ChannelHandlerContext, event: ChannelStateEvent) = client.runSwitch ifOn { - if (client.isWithinReconnectionTimeWindow) { - timer.newTimeout(new TimerTask() { - def run(timeout: Timeout) = { - if (client.isRunning) { - client.openChannels.remove(event.getChannel) - client.connect(reconnectIfAlreadyConnected = true) - } - } - }, RemoteClientSettings.RECONNECT_DELAY.toMillis, TimeUnit.MILLISECONDS) - } else spawn { - client.module.shutdownClientConnection(remoteAddress) // spawn in another thread - } - } - - override def channelConnected(ctx: ChannelHandlerContext, event: ChannelStateEvent) = { - try { - if (client.useTransactionLog) client.sendPendingRequests() // try to send pending requests (still there after client/server crash ard reconnect - client.notifyListeners(RemoteClientConnected(client.module, client.remoteAddress)) - EventHandler.debug(this, "Remote client connected to [%s]".format(ctx.getChannel.getRemoteAddress)) - client.resetReconnectionTimeWindow - } catch { - case e: Exception ⇒ - EventHandler.error(e, this, e.getMessage) - client.notifyListeners(RemoteClientError(e, client.module, client.remoteAddress)) - } - } - - override def channelDisconnected(ctx: ChannelHandlerContext, event: ChannelStateEvent) = { - client.notifyListeners(RemoteClientDisconnected(client.module, client.remoteAddress)) - EventHandler.debug(this, "Remote client disconnected from [%s]".format(ctx.getChannel.getRemoteAddress)) - } - - override def exceptionCaught(ctx: ChannelHandlerContext, event: ExceptionEvent) = { - val cause = event.getCause - if (cause ne null) { - EventHandler.error(event.getCause, this, "Unexpected exception [%s] from downstream in remote client [%s]".format(event.getCause, event)) - - cause match { - case e: ReadTimeoutException ⇒ - spawn { - client.module.shutdownClientConnection(remoteAddress) // spawn in another thread - } - case e: Exception ⇒ - client.notifyListeners(RemoteClientError(e, client.module, client.remoteAddress)) - event.getChannel.close //FIXME Is this the correct behavior? - } - - } else EventHandler.error(this, "Unexpected exception from downstream in remote client [%s]".format(event)) - } - - private def parseException(reply: RemoteMessageProtocol, loader: Option[ClassLoader]): Throwable = { - val exception = reply.getException - val classname = exception.getClassname - try { - val exceptionClass = - if (loader.isDefined) loader.get.loadClass(classname) - else Class.forName(classname) - exceptionClass - .getConstructor(Array[Class[_]](classOf[String]): _*) - .newInstance(exception.getMessage).asInstanceOf[Throwable] - } catch { - case problem: Exception ⇒ - EventHandler.error(problem, this, problem.getMessage) - CannotInstantiateRemoteExceptionDueToRemoteProtocolParsingErrorException(problem, classname, exception.getMessage) - } - } -} - -/** - * Provides the implementation of the Netty remote support - */ -class NettyRemoteSupport extends RemoteSupport with NettyRemoteServerModule with NettyRemoteClientModule { - - // Needed for remote testing and switching on/off under run - val optimizeLocal = new AtomicBoolean(true) - - def optimizeLocalScoped_?() = optimizeLocal.get - - protected[akka] def actorFor( - actorAddress: String, - timeout: Long, - host: String, - port: Int, - loader: Option[ClassLoader]): ActorRef = { - - val homeInetSocketAddress = this.address - if (optimizeLocalScoped_?) { - if ((host == homeInetSocketAddress.getAddress.getHostAddress || - host == homeInetSocketAddress.getHostName) && - port == homeInetSocketAddress.getPort) { - //TODO: switch to InetSocketAddress.equals? - val localRef = findActorByAddressOrUuid(actorAddress, actorAddress) - if (localRef ne null) return localRef //Code significantly simpler with the return statement - } - } - - val remoteInetSocketAddress = new InetSocketAddress(host, port) - EventHandler.debug(this, - "Creating RemoteActorRef with address [%s] connected to [%s]" - .format(actorAddress, remoteInetSocketAddress)) - RemoteActorRef(remoteInetSocketAddress, actorAddress, timeout, loader) - } -} - -class NettyRemoteServer(serverModule: NettyRemoteServerModule, val host: String, val port: Int, val loader: Option[ClassLoader]) { - - import RemoteServerSettings._ - - val name = "NettyRemoteServer@" + host + ":" + port - val address = new InetSocketAddress(host, port) - - private val factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool, Executors.newCachedThreadPool) - - private val bootstrap = new ServerBootstrap(factory) - private val executor = new ExecutionHandler( - new OrderedMemoryAwareThreadPoolExecutor( - EXECUTION_POOL_SIZE, - MAX_CHANNEL_MEMORY_SIZE, - MAX_TOTAL_MEMORY_SIZE, - EXECUTION_POOL_KEEPALIVE.length, - EXECUTION_POOL_KEEPALIVE.unit)) - - // group of open channels, used for clean-up - private val openChannels: ChannelGroup = new DefaultDisposableChannelGroup("akka-remote-server") - - val pipelineFactory = new RemoteServerPipelineFactory(name, openChannels, executor, loader, serverModule) - bootstrap.setPipelineFactory(pipelineFactory) - bootstrap.setOption("backlog", RemoteServerSettings.BACKLOG) - bootstrap.setOption("child.tcpNoDelay", true) - bootstrap.setOption("child.keepAlive", true) - bootstrap.setOption("child.reuseAddress", true) - bootstrap.setOption("child.connectTimeoutMillis", RemoteServerSettings.CONNECTION_TIMEOUT.toMillis) - - openChannels.add(bootstrap.bind(address)) - serverModule.notifyListeners(RemoteServerStarted(serverModule)) - - def shutdown() { - EventHandler.info(this, "Shutting down remote server [%s]".format(name)) - try { - val shutdownSignal = { - val b = RemoteControlProtocol.newBuilder.setCommandType(CommandType.SHUTDOWN) - if (RemoteClientSettings.SECURE_COOKIE.nonEmpty) - b.setCookie(RemoteClientSettings.SECURE_COOKIE.get) - b.build - } - openChannels.write(RemoteEncoder.encode(shutdownSignal)).awaitUninterruptibly - openChannels.disconnect - openChannels.close.awaitUninterruptibly - bootstrap.releaseExternalResources() - executor.releaseExternalResources() - serverModule.notifyListeners(RemoteServerShutdown(serverModule)) - } catch { - case e: Exception ⇒ - EventHandler.error(e, this, e.getMessage) - } - } -} - -trait NettyRemoteServerModule extends RemoteServerModule { - self: RemoteModule ⇒ - - private[akka] val currentServer = new AtomicReference[Option[NettyRemoteServer]](None) - - def address = currentServer.get match { - case Some(server) ⇒ server.address - case None ⇒ ReflectiveAccess.RemoteModule.configDefaultAddress - } - - def name = currentServer.get match { - case Some(server) ⇒ server.name - case None ⇒ - val a = ReflectiveAccess.RemoteModule.configDefaultAddress - "NettyRemoteServer@" + a.getAddress.getHostAddress + ":" + a.getPort - } - - private val _isRunning = new Switch(false) - - def isRunning = _isRunning.isOn - - def start(_hostname: String, _port: Int, loader: Option[ClassLoader] = None): RemoteServerModule = guard withGuard { - try { - _isRunning switchOn { - EventHandler.debug(this, "Starting up remote server on %s:s".format(_hostname, _port)) - - currentServer.set(Some(new NettyRemoteServer(this, _hostname, _port, loader))) - } - } catch { - case e: Exception ⇒ - EventHandler.error(e, this, e.getMessage) - notifyListeners(RemoteServerError(e, this)) - } - this - } - - def shutdownServerModule() = guard withGuard { - _isRunning switchOff { - currentServer.getAndSet(None) foreach { instance ⇒ - EventHandler.debug(this, "Shutting down remote server on %s:%s".format(instance.host, instance.port)) - instance.shutdown() - } - } - } - - /** - * Register RemoteModule Actor by a specific 'id' passed as argument. - *

- * NOTE: If you use this method to register your remote actor then you must unregister the actor by this ID yourself. - */ - def register(id: String, actorRef: ActorRef): Unit = guard withGuard { - if (id.startsWith(UUID_PREFIX)) register(id.substring(UUID_PREFIX.length), actorRef, actorsByUuid) - else register(id, actorRef, actors) - } - - def registerByUuid(actorRef: ActorRef): Unit = guard withGuard { - register(actorRef.uuid.toString, actorRef, actorsByUuid) - } - - private def register[Key](id: Key, actorRef: ActorRef, registry: ConcurrentHashMap[Key, ActorRef]) { - if (_isRunning.isOn) { - registry.put(id, actorRef) //TODO change to putIfAbsent - if (!actorRef.isRunning) actorRef.start() - } - } - - /** - * Register RemoteModule Session Actor by a specific 'id' passed as argument. - *

- * NOTE: If you use this method to register your remote actor then you must unregister the actor by this ID yourself. - */ - def registerPerSession(id: String, factory: ⇒ ActorRef): Unit = synchronized { - registerPerSession(id, () ⇒ factory, actorsFactories) - } - - private def registerPerSession[Key](id: Key, factory: () ⇒ ActorRef, registry: ConcurrentHashMap[Key, () ⇒ ActorRef]) { - if (_isRunning.isOn) - registry.put(id, factory) //TODO change to putIfAbsent - } - - /** - * Unregister RemoteModule Actor that is registered using its 'id' field (not custom ID). - */ - def unregister(actorRef: ActorRef): Unit = guard withGuard { - - if (_isRunning.isOn) { - EventHandler.debug(this, "Unregister server side remote actor with id [%s]".format(actorRef.uuid)) - - actors.remove(actorRef.address, actorRef) - actorsByUuid.remove(actorRef.uuid.toString, actorRef) - } - } - - /** - * Unregister RemoteModule Actor by specific 'id'. - *

- * NOTE: You need to call this method if you have registered an actor by a custom ID. - */ - def unregister(id: String): Unit = guard withGuard { - - if (_isRunning.isOn) { - EventHandler.debug(this, "Unregister server side remote actor with id [%s]".format(id)) - - if (id.startsWith(UUID_PREFIX)) actorsByUuid.remove(id.substring(UUID_PREFIX.length)) - else { - val actorRef = actors get id - actorsByUuid.remove(actorRef.uuid.toString, actorRef) - actors.remove(id, actorRef) - } - } - } - - /** - * Unregister RemoteModule Actor by specific 'id'. - *

- * NOTE: You need to call this method if you have registered an actor by a custom ID. - */ - def unregisterPerSession(id: String): Unit = { - - if (_isRunning.isOn) { - EventHandler.info(this, "Unregistering server side remote actor with id [%s]".format(id)) - - actorsFactories.remove(id) - } - } -} - -/** - * @author Jonas Bonér - */ -class RemoteServerPipelineFactory( - val name: String, - val openChannels: ChannelGroup, - val executor: ExecutionHandler, - val loader: Option[ClassLoader], - val server: NettyRemoteServerModule) extends ChannelPipelineFactory { - - import RemoteServerSettings._ - - def getPipeline: ChannelPipeline = { - val lenDec = new LengthFieldBasedFrameDecoder(MESSAGE_FRAME_SIZE, 0, 4, 0, 4) - val lenPrep = new LengthFieldPrepender(4) - val protobufDec = new ProtobufDecoder(AkkaRemoteProtocol.getDefaultInstance) - val protobufEnc = new ProtobufEncoder - val (enc, dec) = COMPRESSION_SCHEME match { - case "zlib" ⇒ (new ZlibEncoder(ZLIB_COMPRESSION_LEVEL) :: Nil, new ZlibDecoder :: Nil) - case _ ⇒ (Nil, Nil) - } - val authenticator = if (REQUIRE_COOKIE) new RemoteServerAuthenticationHandler(SECURE_COOKIE) :: Nil else Nil - val remoteServer = new RemoteServerHandler(name, openChannels, loader, server) - val stages: List[ChannelHandler] = dec ::: lenDec :: protobufDec :: enc ::: lenPrep :: protobufEnc :: executor :: authenticator ::: remoteServer :: Nil - new StaticChannelPipeline(stages: _*) - } -} - -@ChannelHandler.Sharable -class RemoteServerAuthenticationHandler(secureCookie: Option[String]) extends SimpleChannelUpstreamHandler { - val authenticated = new AnyRef - - override def messageReceived(ctx: ChannelHandlerContext, event: MessageEvent) = secureCookie match { - case None ⇒ ctx.sendUpstream(event) - case Some(cookie) ⇒ - ctx.getAttachment match { - case `authenticated` ⇒ ctx.sendUpstream(event) - case null ⇒ event.getMessage match { - case remoteProtocol: AkkaRemoteProtocol if remoteProtocol.hasInstruction ⇒ - remoteProtocol.getInstruction.getCookie match { - case `cookie` ⇒ - ctx.setAttachment(authenticated) - ctx.sendUpstream(event) - case _ ⇒ - throw new SecurityException( - "The remote client [" + ctx.getChannel.getRemoteAddress + "] secure cookie is not the same as remote server secure cookie") - } - case _ ⇒ - throw new SecurityException("The remote client [" + ctx.getChannel.getRemoteAddress + "] is not authorized!") - } - } - } -} - -/** - * @author Jonas Bonér - */ -@ChannelHandler.Sharable -class RemoteServerHandler( - val name: String, - val openChannels: ChannelGroup, - val applicationLoader: Option[ClassLoader], - val server: NettyRemoteServerModule) extends SimpleChannelUpstreamHandler { - - import RemoteServerSettings._ - - // applicationLoader.foreach(MessageSerializer.setClassLoader(_)) //TODO: REVISIT: THIS FEELS A BIT DODGY - - val sessionActors = new ChannelLocal[ConcurrentHashMap[String, ActorRef]]() - - //Writes the specified message to the specified channel and propagates write errors to listeners - private def write(channel: Channel, payload: AkkaRemoteProtocol): Unit = { - channel.write(payload).addListener( - new ChannelFutureListener { - def operationComplete(future: ChannelFuture): Unit = { - if (future.isCancelled) { - //Not interesting at the moment - } else if (!future.isSuccess) { - val socketAddress = future.getChannel.getRemoteAddress match { - case i: InetSocketAddress ⇒ Some(i) - case _ ⇒ None - } - server.notifyListeners(RemoteServerWriteFailed(payload, future.getCause, server, socketAddress)) - } - } - }) - } - - /** - * ChannelOpen overridden to store open channels for a clean postStop of a node. - * If a channel is closed before, it is automatically removed from the open channels group. - */ - override def channelOpen(ctx: ChannelHandlerContext, event: ChannelStateEvent) = openChannels.add(ctx.getChannel) - - override def channelConnected(ctx: ChannelHandlerContext, event: ChannelStateEvent) = { - val clientAddress = getClientAddress(ctx) - EventHandler.debug(this, "Remote client [%s] connected to [%s]".format(clientAddress, server.name)) - - sessionActors.set(event.getChannel(), new ConcurrentHashMap[String, ActorRef]()) - server.notifyListeners(RemoteServerClientConnected(server, clientAddress)) - } - - override def channelDisconnected(ctx: ChannelHandlerContext, event: ChannelStateEvent) = { - val clientAddress = getClientAddress(ctx) - - EventHandler.debug(this, "Remote client [%s] disconnected from [%s]".format(clientAddress, server.name)) - - // stop all session actors - for ( - map ← Option(sessionActors.remove(event.getChannel)); - actor ← collectionAsScalaIterable(map.values) - ) { - try { - actor ! PoisonPill - } catch { - case e: Exception ⇒ EventHandler.error(e, this, "Couldn't stop %s".format(actor)) - } - } - - server.notifyListeners(RemoteServerClientDisconnected(server, clientAddress)) - } - - override def channelClosed(ctx: ChannelHandlerContext, event: ChannelStateEvent) = { - val clientAddress = getClientAddress(ctx) - EventHandler.debug("Remote client [%s] channel closed from [%s]".format(clientAddress, server.name), this) - - server.notifyListeners(RemoteServerClientClosed(server, clientAddress)) - } - - override def messageReceived(ctx: ChannelHandlerContext, event: MessageEvent) = { - event.getMessage match { - case null ⇒ - throw new IllegalActorStateException("Message in remote MessageEvent is null: " + event) - - case remote: AkkaRemoteProtocol if remote.hasMessage ⇒ - handleRemoteMessageProtocol(remote.getMessage, event.getChannel) - - //case remote: AkkaRemoteProtocol if remote.hasInstruction => RemoteServer cannot receive control messages (yet) - - case _ ⇒ //ignore - } - } - - override def exceptionCaught(ctx: ChannelHandlerContext, event: ExceptionEvent) = { - EventHandler.error(event.getCause, this, "Unexpected exception from remote downstream") - - event.getChannel.close - server.notifyListeners(RemoteServerError(event.getCause, server)) - } - - private def getClientAddress(ctx: ChannelHandlerContext): Option[InetSocketAddress] = - ctx.getChannel.getRemoteAddress match { - case inet: InetSocketAddress ⇒ Some(inet) - case _ ⇒ None - } - - private def handleRemoteMessageProtocol(request: RemoteMessageProtocol, channel: Channel) = try { - EventHandler.debug(this, "Received remote message [%s]".format(request)) - dispatchToActor(request, channel) - } catch { - case e: Exception ⇒ - server.notifyListeners(RemoteServerError(e, server)) - EventHandler.error(e, this, e.getMessage) - } - - private def dispatchToActor(request: RemoteMessageProtocol, channel: Channel) { - val actorInfo = request.getActorInfo - - EventHandler.debug(this, "Dispatching to remote actor [%s]".format(actorInfo.getUuid)) - - val actorRef = - try { - createActor(actorInfo, channel) - } catch { - case e: SecurityException ⇒ - EventHandler.error(e, this, e.getMessage) - write(channel, createErrorReplyMessage(e, request)) - server.notifyListeners(RemoteServerError(e, server)) - return - } - - val message = MessageSerializer.deserialize(request.getMessage) - val sender = - if (request.hasSender) Some(RemoteActorSerialization.fromProtobufToRemoteActorRef(request.getSender, applicationLoader)) - else None - - message match { - // first match on system messages - case RemoteActorSystemMessage.Stop ⇒ - if (UNTRUSTED_MODE) throw new SecurityException("RemoteModule server is operating is untrusted mode, can not stop the actor") - else actorRef.stop() - - case _: LifeCycleMessage if (UNTRUSTED_MODE) ⇒ - throw new SecurityException("RemoteModule server is operating is untrusted mode, can not pass on a LifeCycleMessage to the remote actor") - - case _ ⇒ // then match on user defined messages - if (request.getOneWay) actorRef.!(message)(sender) - else actorRef.postMessageToMailboxAndCreateFutureResultWithTimeout( - message, - request.getActorInfo.getTimeout, - new ActorPromise(request.getActorInfo.getTimeout). - onComplete(_.value.get match { - case Left(exception) ⇒ write(channel, createErrorReplyMessage(exception, request)) - case r: Right[_, _] ⇒ - val messageBuilder = RemoteActorSerialization.createRemoteMessageProtocolBuilder( - Some(actorRef), - Right(request.getUuid), - actorInfo.getAddress, - actorInfo.getTimeout, - r.asInstanceOf[Either[Throwable, Any]], - isOneWay = true, - Some(actorRef)) - - // FIXME lift in the supervisor uuid management into toh createRemoteMessageProtocolBuilder method - if (request.hasSupervisorUuid) messageBuilder.setSupervisorUuid(request.getSupervisorUuid) - - write(channel, RemoteEncoder.encode(messageBuilder.build)) - })) - } - } - - /** - * Creates a new instance of the actor with name, uuid and timeout specified as arguments. - * - * If actor already created then just return it from the registry. - * - * Does not start the actor. - */ - private def createActor(actorInfo: ActorInfoProtocol, channel: Channel): ActorRef = { - val uuid = actorInfo.getUuid - val address = actorInfo.getAddress - // val address = { - // // strip off clusterActorRefPrefix if needed - // val addr = actorInfo.getAddress - // if (addr.startsWith(Address.clusterActorRefPrefix)) addr.substring(addr.indexOf('.') + 1, addr.length) - // else addr - // } - - EventHandler.debug(this, - "Looking up a remotely available actor for address [%s] on node [%s]" - .format(address, Config.nodename)) - - val actorRef = Actor.createActor(address, () ⇒ createSessionActor(actorInfo, channel)) - - if (actorRef eq null) throw new IllegalActorStateException("Could not find a remote actor with address [" + address + "] or uuid [" + uuid + "]") - - actorRef - } - - /** - * gets the actor from the session, or creates one if there is a factory for it - */ - private def createSessionActor(actorInfo: ActorInfoProtocol, channel: Channel): ActorRef = { - val uuid = actorInfo.getUuid - val address = actorInfo.getAddress - - findSessionActor(address, channel) match { - case null ⇒ // we dont have it in the session either, see if we have a factory for it - server.findActorFactory(address) match { - case null ⇒ null - case factory ⇒ - val actorRef = factory() - actorRef.uuid = parseUuid(uuid) //FIXME is this sensible? - sessionActors.get(channel).put(address, actorRef) - actorRef.start() //Start it where's it's created - } - case sessionActor ⇒ sessionActor - } - } - - private def findSessionActor(id: String, channel: Channel): ActorRef = - sessionActors.get(channel) match { - case null ⇒ null - case map ⇒ map get id - } - - private def createErrorReplyMessage(exception: Throwable, request: RemoteMessageProtocol): AkkaRemoteProtocol = { - val actorInfo = request.getActorInfo - val messageBuilder = RemoteActorSerialization.createRemoteMessageProtocolBuilder( - None, - Right(request.getUuid), - actorInfo.getAddress, - actorInfo.getTimeout, - Left(exception), - true, - None) - if (request.hasSupervisorUuid) messageBuilder.setSupervisorUuid(request.getSupervisorUuid) - RemoteEncoder.encode(messageBuilder.build) - } - - protected def parseUuid(protocol: UuidProtocol): Uuid = uuidFrom(protocol.getHigh, protocol.getLow) -} - -class DefaultDisposableChannelGroup(name: String) extends DefaultChannelGroup(name) { - protected val guard = new ReadWriteGuard - protected val open = new AtomicBoolean(true) - - override def add(channel: Channel): Boolean = guard withReadGuard { - if (open.get) { - super.add(channel) - } else { - channel.close - false - } - } - - override def close(): ChannelGroupFuture = guard withWriteGuard { - if (open.getAndSet(false)) { - super.close - } else { - throw new IllegalStateException("ChannelGroup already closed, cannot add new channel") - } - } -} diff --git a/akka-cluster/src/main/scala/akka/cluster/untitled b/akka-cluster/src/main/scala/akka/cluster/untitled deleted file mode 100644 index ec128ad190..0000000000 --- a/akka-cluster/src/main/scala/akka/cluster/untitled +++ /dev/null @@ -1,41 +0,0 @@ - -diff --git a/akka-cluster/src/test/scala/akka/cluster/TransactionLogSpec.scala b/akka-cluster/src/test/scala/akka/cluster/TransactionLogSpec.scala -index b7183ca..c267bc6 100644 ---- a/akka-cluster/src/test/scala/akka/cluster/TransactionLogSpec.scala -+++ b/akka-cluster/src/test/scala/akka/cluster/TransactionLogSpec.scala -@@ -107,7 +107,7 @@ class TransactionLogSpec extends WordSpec with MustMatchers with BeforeAndAfterA - - val txlog2 = TransactionLog.logFor(uuid, false, null) - val (snapshotAsBytes, entriesAsBytes) = txlog2.latestSnapshotAndSubsequentEntries -- new String(snapshotAsBytes, "UTF-8") must equal("snapshot") -+ new String(snapshotAsBytes.getOrElse(fail("No snapshot")), "UTF-8") must equal("snapshot") - - val entries = entriesAsBytes.map(bytes ⇒ new String(bytes, "UTF-8")) - entries.size must equal(4) -@@ -136,7 +136,7 @@ class TransactionLogSpec extends WordSpec with MustMatchers with BeforeAndAfterA - - val txlog2 = TransactionLog.logFor(uuid, false, null) - val (snapshotAsBytes, entriesAsBytes) = txlog2.latestSnapshotAndSubsequentEntries -- new String(snapshotAsBytes, "UTF-8") must equal("snapshot") -+ new String(snapshotAsBytes.getOrElse(fail("No snapshot")), "UTF-8") must equal("snapshot") - - val entries = entriesAsBytes.map(bytes ⇒ new String(bytes, "UTF-8")) - entries.size must equal(2) -@@ -251,7 +251,7 @@ class TransactionLogSpec extends WordSpec with MustMatchers with BeforeAndAfterA - Thread.sleep(200) - val (snapshotAsBytes, entriesAsBytes) = txlog2.latestSnapshotAndSubsequentEntries - Thread.sleep(200) -- new String(snapshotAsBytes, "UTF-8") must equal("snapshot") -+ new String(snapshotAsBytes.getOrElse(fail("No snapshot")), "UTF-8") must equal("snapshot") - - val entries = entriesAsBytes.map(bytes ⇒ new String(bytes, "UTF-8")) - Thread.sleep(200) -@@ -290,7 +290,7 @@ class TransactionLogSpec extends WordSpec with MustMatchers with BeforeAndAfterA - Thread.sleep(200) - val (snapshotAsBytes, entriesAsBytes) = txlog2.latestSnapshotAndSubsequentEntries - Thread.sleep(200) -- new String(snapshotAsBytes, "UTF-8") must equal("snapshot") -+ new String(snapshotAsBytes.getOrElse(fail("No snapshot")), "UTF-8") must equal("snapshot") - val entries = entriesAsBytes.map(bytes ⇒ new String(bytes, "UTF-8")) - Thread.sleep(200) - entries.size must equal(2) \ No newline at end of file diff --git a/akka-cluster/src/main/scala/akka/package.scala b/akka-cluster/src/main/scala/akka/package.scala deleted file mode 100644 index 4fae688d03..0000000000 --- a/akka-cluster/src/main/scala/akka/package.scala +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka - -package object serialization { - type JsValue = _root_.dispatch.json.JsValue - val JsValue = _root_.dispatch.json.JsValue - val Js = _root_.dispatch.json.Js - val JsonSerialization = sjson.json.JsonSerialization - val DefaultProtocol = sjson.json.DefaultProtocol -} diff --git a/akka-cluster/src/main/scala/akka/serialization/Compression.scala b/akka-cluster/src/main/scala/akka/serialization/Compression.scala deleted file mode 100644 index 3602b81438..0000000000 --- a/akka-cluster/src/main/scala/akka/serialization/Compression.scala +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.serialization - -/** - * @author Jonas Bonér - */ -object Compression { - - /** - * @author Jonas Bonér - */ - object LZF { - import voldemort.store.compress.lzf._ - def compress(bytes: Array[Byte]): Array[Byte] = LZFEncoder encode bytes - def uncompress(bytes: Array[Byte]): Array[Byte] = LZFDecoder decode bytes - } -} - diff --git a/akka-cluster/src/main/scala/akka/serialization/SerializationProtocol.scala b/akka-cluster/src/main/scala/akka/serialization/SerializationProtocol.scala deleted file mode 100644 index b7be90097c..0000000000 --- a/akka-cluster/src/main/scala/akka/serialization/SerializationProtocol.scala +++ /dev/null @@ -1,361 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.serialization - -import akka.config.Supervision._ -import akka.actor.{ uuidFrom, newUuid } -import akka.actor._ -import DeploymentConfig._ -import akka.dispatch.MessageInvocation -import akka.util.{ ReflectiveAccess, Duration } -import akka.cluster.{ RemoteClientSettings, MessageSerializer } -import akka.cluster.RemoteProtocol -import RemoteProtocol._ - -import scala.collection.immutable.Stack - -import java.net.InetSocketAddress - -import com.google.protobuf.ByteString - -import com.eaio.uuid.UUID -import akka.event.EventHandler -import java.util.{ LinkedList, Collections } - -/** - * Module for local actor serialization. - */ -object ActorSerialization { - implicit val defaultSerializer = akka.serialization.JavaSerializer // Format.Default - - def fromBinary[T <: Actor](bytes: Array[Byte], homeAddress: InetSocketAddress): ActorRef = - fromBinaryToLocalActorRef(bytes, None, Some(homeAddress)) - - def fromBinary[T <: Actor](bytes: Array[Byte], uuid: UUID): ActorRef = - fromBinaryToLocalActorRef(bytes, Some(uuid), None) - - def fromBinary[T <: Actor](bytes: Array[Byte]): ActorRef = - fromBinaryToLocalActorRef(bytes, None, None) - - def toBinary[T <: Actor]( - a: ActorRef, - serializeMailBox: Boolean = true, - replicationScheme: ReplicationScheme = Transient): Array[Byte] = - toSerializedActorRefProtocol(a, serializeMailBox, replicationScheme).toByteArray - - // wrapper for implicits to be used by Java - def fromBinaryJ[T <: Actor](bytes: Array[Byte]): ActorRef = - fromBinary(bytes) - - // wrapper for implicits to be used by Java - def toBinaryJ[T <: Actor]( - a: ActorRef, - srlMailBox: Boolean, - replicationScheme: ReplicationScheme): Array[Byte] = - toBinary(a, srlMailBox, replicationScheme) - - private[akka] def toSerializedActorRefProtocol[T <: Actor]( - actorRef: ActorRef, - serializeMailBox: Boolean, - replicationScheme: ReplicationScheme): SerializedActorRefProtocol = { - - val localRef: Option[LocalActorRef] = actorRef match { - case l: LocalActorRef ⇒ Some(l) - case _ ⇒ None - } - - val lifeCycleProtocol: Option[LifeCycleProtocol] = { - actorRef.lifeCycle match { - case Permanent ⇒ Some(LifeCycleProtocol.newBuilder.setLifeCycle(LifeCycleType.PERMANENT).build) - case Temporary ⇒ Some(LifeCycleProtocol.newBuilder.setLifeCycle(LifeCycleType.TEMPORARY).build) - case UndefinedLifeCycle ⇒ None //No need to send the undefined lifecycle over the wire //builder.setLifeCycle(LifeCycleType.UNDEFINED) - } - } - - val builder = SerializedActorRefProtocol.newBuilder - .setUuid(UuidProtocol.newBuilder.setHigh(actorRef.uuid.getTime).setLow(actorRef.uuid.getClockSeqAndNode).build) - .setAddress(actorRef.address) - .setTimeout(actorRef.timeout) - - if (localRef.isDefined) - builder.setActorClassname(localRef.get.actorInstance.get.getClass.getName) //TODO FIXME Why is the classname needed anymore? - - replicationScheme match { - case _: Transient | Transient ⇒ - builder.setReplicationStorage(ReplicationStorageType.TRANSIENT) - - case Replication(storage, strategy) ⇒ - val storageType = storage match { - case _: TransactionLog | TransactionLog ⇒ ReplicationStorageType.TRANSACTION_LOG - case _: DataGrid | DataGrid ⇒ ReplicationStorageType.DATA_GRID - } - builder.setReplicationStorage(storageType) - - val strategyType = strategy match { - case _: WriteBehind ⇒ ReplicationStrategyType.WRITE_BEHIND - case _: WriteThrough ⇒ ReplicationStrategyType.WRITE_THROUGH - } - builder.setReplicationStrategy(strategyType) - } - - lifeCycleProtocol.foreach(builder.setLifeCycle(_)) - actorRef.supervisor.foreach(s ⇒ builder.setSupervisor(RemoteActorSerialization.toRemoteActorRefProtocol(s))) - - localRef foreach { l ⇒ - if (serializeMailBox) { - l.mailbox match { - case null ⇒ throw new IllegalActorStateException("Can't serialize an actor that has not been started.") - case q: java.util.Queue[_] ⇒ - val l = new scala.collection.mutable.ListBuffer[MessageInvocation] - val it = q.iterator - while (it.hasNext) l += it.next.asInstanceOf[MessageInvocation] - - l map { m ⇒ - RemoteActorSerialization.createRemoteMessageProtocolBuilder( - Option(m.receiver), - Left(actorRef.uuid), - actorRef.address, - actorRef.timeout, - Right(m.message), - false, - m.channel match { - case a: ActorRef ⇒ Some(a) - case _ ⇒ None - }) - } foreach { - builder.addMessages(_) - } - } - } - - l.receiveTimeout.foreach(builder.setReceiveTimeout(_)) - val actorInstance = l.actorInstance.get - Serialization.serialize(actorInstance.asInstanceOf[T]) match { - case Right(bytes) ⇒ builder.setActorInstance(ByteString.copyFrom(bytes)) - case Left(exception) ⇒ throw new Exception("Error serializing : " + actorInstance.getClass.getName) - } - val stack = l.hotswap - if (!stack.isEmpty) - builder.setHotswapStack(ByteString.copyFrom(akka.serialization.JavaSerializer.toBinary(stack))) - } - - builder.build - } - - private def fromBinaryToLocalActorRef[T <: Actor]( - bytes: Array[Byte], - uuid: Option[UUID], - homeAddress: Option[InetSocketAddress]): ActorRef = { - val builder = SerializedActorRefProtocol.newBuilder.mergeFrom(bytes) - fromProtobufToLocalActorRef(builder.build, uuid, None) - } - - private[akka] def fromProtobufToLocalActorRef[T <: Actor]( - protocol: SerializedActorRefProtocol, - overriddenUuid: Option[UUID], - loader: Option[ClassLoader]): ActorRef = { - - EventHandler.debug(this, "Deserializing SerializedActorRefProtocol to LocalActorRef:\n%s".format(protocol)) - - // import ReplicationStorageType._ - // import ReplicationStrategyType._ - // val replicationScheme = - // if (protocol.hasReplicationStorage) { - // protocol.getReplicationStorage match { - // case TRANSIENT ⇒ Transient - // case store ⇒ - // val storage = store match { - // case TRANSACTION_LOG ⇒ TransactionLog - // case DATA_GRID ⇒ DataGrid - // } - // val strategy = if (protocol.hasReplicationStrategy) { - // protocol.getReplicationStrategy match { - // case WRITE_THROUGH ⇒ WriteThrough - // case WRITE_BEHIND ⇒ WriteBehind - // } - // } else throw new IllegalActorStateException( - // "Expected replication strategy for replication storage [" + storage + "]") - // Replication(storage, strategy) - // } - // } else Transient - - val storedHotswap = - try { - Serialization.deserialize( - protocol.getHotswapStack.toByteArray, - classOf[Stack[PartialFunction[Any, Unit]]], - loader) match { - case Right(r) ⇒ r.asInstanceOf[Stack[PartialFunction[Any, Unit]]] - case Left(ex) ⇒ throw new Exception("Cannot de-serialize hotswapstack") - } - } catch { - case e: Exception ⇒ Stack[PartialFunction[Any, Unit]]() - } - - val storedLifeCycle = - if (protocol.hasLifeCycle) { - protocol.getLifeCycle.getLifeCycle match { - case LifeCycleType.PERMANENT ⇒ Permanent - case LifeCycleType.TEMPORARY ⇒ Temporary - case unknown ⇒ UndefinedLifeCycle - } - } else UndefinedLifeCycle - - val storedSupervisor = - if (protocol.hasSupervisor) Some(RemoteActorSerialization.fromProtobufToRemoteActorRef(protocol.getSupervisor, loader)) - else None - - val classLoader = loader.getOrElse(this.getClass.getClassLoader) - val bytes = protocol.getActorInstance.toByteArray - val actorClass = classLoader.loadClass(protocol.getActorClassname) - val factory = () ⇒ { - Serialization.deserialize(bytes, actorClass, loader) match { - case Right(r) ⇒ r.asInstanceOf[Actor] - case Left(ex) ⇒ throw new Exception("Cannot de-serialize : " + actorClass) - } - } - - val actorUuid = overriddenUuid match { - case Some(uuid) ⇒ uuid - case None ⇒ uuidFrom(protocol.getUuid.getHigh, protocol.getUuid.getLow) - } - - val props = Props(creator = factory, - timeout = if (protocol.hasTimeout) protocol.getTimeout else Timeout.default, - lifeCycle = storedLifeCycle, - supervisor = storedSupervisor //TODO what dispatcher should it use? - //TODO what faultHandler should it use? - // - ) - - val receiveTimeout = if (protocol.hasReceiveTimeout) Some(protocol.getReceiveTimeout) else None //TODO FIXME, I'm expensive and slow - - val ar = new LocalActorRef(actorUuid, protocol.getAddress, props, receiveTimeout, storedHotswap) - - //Deserialize messages - { - val iterator = protocol.getMessagesList.iterator() - while (iterator.hasNext()) - ar ! MessageSerializer.deserialize(iterator.next().getMessage, Some(classLoader)) //TODO This is broken, why aren't we preserving the sender? - } - - ar - } -} - -object RemoteActorSerialization { - - /** - * Deserializes a byte array (Array[Byte]) into an RemoteActorRef instance. - */ - def fromBinaryToRemoteActorRef(bytes: Array[Byte]): ActorRef = - fromProtobufToRemoteActorRef(RemoteActorRefProtocol.newBuilder.mergeFrom(bytes).build, None) - - /** - * Deserializes a byte array (Array[Byte]) into an RemoteActorRef instance. - */ - def fromBinaryToRemoteActorRef(bytes: Array[Byte], loader: ClassLoader): ActorRef = - fromProtobufToRemoteActorRef(RemoteActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader)) - - /** - * Deserializes a RemoteActorRefProtocol Protocol Buffers (protobuf) Message into an RemoteActorRef instance. - */ - private[akka] def fromProtobufToRemoteActorRef(protocol: RemoteActorRefProtocol, loader: Option[ClassLoader]): ActorRef = { - EventHandler.debug(this, "Deserializing RemoteActorRefProtocol to RemoteActorRef:\n %s".format(protocol)) - - val ref = RemoteActorRef( - JavaSerializer.fromBinary(protocol.getInetSocketAddress.toByteArray, Some(classOf[InetSocketAddress]), loader).asInstanceOf[InetSocketAddress], - protocol.getAddress, - protocol.getTimeout, - loader) - - EventHandler.debug(this, "Newly deserialized RemoteActorRef has uuid: %s".format(ref.uuid)) - - ref - } - - /** - * Serializes the ActorRef instance into a Protocol Buffers (protobuf) Message. - */ - def toRemoteActorRefProtocol(actor: ActorRef): RemoteActorRefProtocol = { - val remoteAddress = actor match { - case ar: RemoteActorRef ⇒ - ar.remoteAddress - case ar: LocalActorRef ⇒ - Actor.remote.registerByUuid(ar) - ReflectiveAccess.RemoteModule.configDefaultAddress - case _ ⇒ - ReflectiveAccess.RemoteModule.configDefaultAddress - } - - EventHandler.debug(this, "Register serialized Actor [%s] as remote @ [%s]".format(actor.uuid, remoteAddress)) - - RemoteActorRefProtocol.newBuilder - .setInetSocketAddress(ByteString.copyFrom(JavaSerializer.toBinary(remoteAddress))) - .setAddress(actor.address) - .setTimeout(actor.timeout) - .build - } - - def createRemoteMessageProtocolBuilder( - actorRef: Option[ActorRef], - replyUuid: Either[Uuid, UuidProtocol], - actorAddress: String, - timeout: Long, - message: Either[Throwable, Any], - isOneWay: Boolean, - senderOption: Option[ActorRef]): RemoteMessageProtocol.Builder = { - - val uuidProtocol = replyUuid match { - case Left(uid) ⇒ UuidProtocol.newBuilder.setHigh(uid.getTime).setLow(uid.getClockSeqAndNode).build - case Right(protocol) ⇒ protocol - } - - val actorInfoBuilder = ActorInfoProtocol.newBuilder - .setUuid(uuidProtocol) - .setAddress(actorAddress) - .setTimeout(timeout) - - val actorInfo = actorInfoBuilder.build - val messageBuilder = RemoteMessageProtocol.newBuilder - .setUuid({ - val messageUuid = newUuid - UuidProtocol.newBuilder.setHigh(messageUuid.getTime).setLow(messageUuid.getClockSeqAndNode).build - }) - .setActorInfo(actorInfo) - .setOneWay(isOneWay) - - message match { - case Right(message) ⇒ - messageBuilder.setMessage(MessageSerializer.serialize(message.asInstanceOf[AnyRef])) - case Left(exception) ⇒ - messageBuilder.setException(ExceptionProtocol.newBuilder - .setClassname(exception.getClass.getName) - .setMessage(empty(exception.getMessage)) - .build) - } - - def empty(s: String): String = s match { - case null ⇒ "" - case s ⇒ s - } - - /* TODO invent new supervision strategy - actorRef.foreach { ref => - ref.registerSupervisorAsRemoteActor.foreach { id => - messageBuilder.setSupervisorUuid( - UuidProtocol.newBuilder - .setHigh(id.getTime) - .setLow(id.getClockSeqAndNode) - .build) - } - } */ - - if (senderOption.isDefined) - messageBuilder.setSender(toRemoteActorRefProtocol(senderOption.get)) - - messageBuilder - } -} diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/ClusterTestNode.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/ClusterTestNode.scala deleted file mode 100644 index 89cb8b18d5..0000000000 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/ClusterTestNode.scala +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import org.scalatest.WordSpec -import org.scalatest.matchers.MustMatchers -import org.scalatest.BeforeAndAfterAll - -import akka.util.duration._ -import akka.util.Duration -import System.{ currentTimeMillis ⇒ now } - -import java.io.File - -trait ClusterTestNode extends WordSpec with MustMatchers with BeforeAndAfterAll { - - override def beforeAll() = { - ClusterTestNode.waitForReady(getClass.getName) - } - - override def afterAll() = { - ClusterTestNode.exit(getClass.getName) - } -} - -object ClusterTestNode { - val TestMarker = "MultiJvm" - val HomeDir = "_akka_cluster" - val TestDir = "multi-jvm" - val Sleep = 100.millis - val Timeout = 1.minute - - def ready(className: String) = { - readyFile(className).createNewFile() - } - - def waitForReady(className: String) = { - if (!waitExists(readyFile(className))) { - cleanUp(className) - sys.error("Timeout waiting for cluster ready") - } - } - - def exit(className: String) = { - exitFile(className).createNewFile() - } - - def waitForExits(className: String, nodes: Int) = { - if (!waitCount(exitDir(className), nodes)) { - cleanUp(className) - sys.error("Timeout waiting for node exits") - } - } - - def cleanUp(className: String) = { - deleteRecursive(testDir(className)) - } - - def testName(name: String) = { - val i = name.indexOf(TestMarker) - if (i >= 0) name.substring(0, i) else name - } - - def nodeName(name: String) = { - val i = name.indexOf(TestMarker) - if (i >= 0) name.substring(i + TestMarker.length) else name - } - - def testDir(className: String) = { - val home = new File(HomeDir) - val tests = new File(home, TestDir) - val dir = new File(tests, testName(className)) - dir.mkdirs() - dir - } - - def readyFile(className: String) = { - new File(testDir(className), "ready") - } - - def exitDir(className: String) = { - val dir = new File(testDir(className), "exit") - dir.mkdirs() - dir - } - - def exitFile(className: String) = { - new File(exitDir(className), nodeName(className)) - } - - def waitExists(file: File) = waitFor(file.exists) - - def waitCount(file: File, n: Int) = waitFor(file.list.size >= n) - - def waitFor(test: ⇒ Boolean, sleep: Duration = Sleep, timeout: Duration = Timeout): Boolean = { - val start = now - val limit = start + timeout.toMillis - var passed = test - var expired = false - while (!passed && !expired) { - if (now > limit) expired = true - else { - Thread.sleep(sleep.toMillis) - passed = test - } - } - passed - } - - def deleteRecursive(file: File): Boolean = { - if (file.isDirectory) file.listFiles.foreach(deleteRecursive) - file.delete() - } -} diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/MasterClusterTestNode.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/MasterClusterTestNode.scala deleted file mode 100644 index e805c9156e..0000000000 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/MasterClusterTestNode.scala +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import org.scalatest.WordSpec -import org.scalatest.matchers.MustMatchers -import org.scalatest.BeforeAndAfterAll - -trait MasterClusterTestNode extends WordSpec with MustMatchers with BeforeAndAfterAll { - def testNodes: Int - - override def beforeAll() = { - LocalCluster.startLocalCluster() - onReady() - ClusterTestNode.ready(getClass.getName) - } - - def onReady() = {} - - override def afterAll() = { - ClusterTestNode.waitForExits(getClass.getName, testNodes - 1) - ClusterTestNode.cleanUp(getClass.getName) - onShutdown() - LocalCluster.shutdownLocalCluster() - } - - def onShutdown() = {} -} - diff --git a/akka-cluster/src/multi-jvm/scala/akka/cluster/QuietReporter.scala b/akka-cluster/src/multi-jvm/scala/akka/cluster/QuietReporter.scala deleted file mode 100644 index 005b423b04..0000000000 --- a/akka-cluster/src/multi-jvm/scala/akka/cluster/QuietReporter.scala +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package org.scalatest.akka - -import org.scalatest.tools.StandardOutReporter -import org.scalatest.events._ -import java.lang.Boolean.getBoolean - -class QuietReporter(inColor: Boolean) extends StandardOutReporter(false, inColor, false, false) { - def this() = this(!getBoolean("akka.test.nocolor")) - - override def apply(event: Event): Unit = event match { - case _: RunStarting ⇒ () - case _ ⇒ super.apply(event) - } - - override def makeFinalReport(resourceName: String, duration: Option[Long], summaryOption: Option[Summary]): Unit = {} -} diff --git a/akka-cluster/src/test/java/akka/actor/ProtobufProtocol.java b/akka-cluster/src/test/java/akka/actor/ProtobufProtocol.java deleted file mode 100644 index 38d929f4e5..0000000000 --- a/akka-cluster/src/test/java/akka/actor/ProtobufProtocol.java +++ /dev/null @@ -1,565 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ProtobufProtocol.proto - -package akka.actor; - -public final class ProtobufProtocol { - private ProtobufProtocol() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface MyMessageOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint64 id = 1; - boolean hasId(); - long getId(); - - // required string name = 2; - boolean hasName(); - String getName(); - - // required bool status = 3; - boolean hasStatus(); - boolean getStatus(); - } - public static final class MyMessage extends - com.google.protobuf.GeneratedMessage - implements MyMessageOrBuilder { - // Use MyMessage.newBuilder() to construct. - private MyMessage(Builder builder) { - super(builder); - } - private MyMessage(boolean noInit) {} - - private static final MyMessage defaultInstance; - public static MyMessage getDefaultInstance() { - return defaultInstance; - } - - public MyMessage getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_fieldAccessorTable; - } - - private int bitField0_; - // required uint64 id = 1; - public static final int ID_FIELD_NUMBER = 1; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getId() { - return id_; - } - - // required string name = 2; - public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required bool status = 3; - public static final int STATUS_FIELD_NUMBER = 3; - private boolean status_; - public boolean hasStatus() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public boolean getStatus() { - return status_; - } - - private void initFields() { - id_ = 0L; - name_ = ""; - status_ = false; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasStatus()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt64(1, id_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(3, status_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, id_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, status_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static akka.actor.ProtobufProtocol.MyMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.actor.ProtobufProtocol.MyMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static akka.actor.ProtobufProtocol.MyMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(akka.actor.ProtobufProtocol.MyMessage prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements akka.actor.ProtobufProtocol.MyMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return akka.actor.ProtobufProtocol.internal_static_akka_actor_MyMessage_fieldAccessorTable; - } - - // Construct using akka.actor.ProtobufProtocol.MyMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - status_ = false; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return akka.actor.ProtobufProtocol.MyMessage.getDescriptor(); - } - - public akka.actor.ProtobufProtocol.MyMessage getDefaultInstanceForType() { - return akka.actor.ProtobufProtocol.MyMessage.getDefaultInstance(); - } - - public akka.actor.ProtobufProtocol.MyMessage build() { - akka.actor.ProtobufProtocol.MyMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private akka.actor.ProtobufProtocol.MyMessage buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - akka.actor.ProtobufProtocol.MyMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public akka.actor.ProtobufProtocol.MyMessage buildPartial() { - akka.actor.ProtobufProtocol.MyMessage result = new akka.actor.ProtobufProtocol.MyMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.status_ = status_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof akka.actor.ProtobufProtocol.MyMessage) { - return mergeFrom((akka.actor.ProtobufProtocol.MyMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(akka.actor.ProtobufProtocol.MyMessage other) { - if (other == akka.actor.ProtobufProtocol.MyMessage.getDefaultInstance()) return this; - if (other.hasId()) { - setId(other.getId()); - } - if (other.hasName()) { - setName(other.getName()); - } - if (other.hasStatus()) { - setStatus(other.getStatus()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasId()) { - - return false; - } - if (!hasName()) { - - return false; - } - if (!hasStatus()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - id_ = input.readUInt64(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - name_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - status_ = input.readBool(); - break; - } - } - } - } - - private int bitField0_; - - // required uint64 id = 1; - private long id_ ; - public boolean hasId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getId() { - return id_; - } - public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); - return this; - } - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); - return this; - } - - // required string name = 2; - private java.lang.Object name_ = ""; - public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - name_ = value; - onChanged(); - return this; - } - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000002); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - name_ = value; - onChanged(); - } - - // required bool status = 3; - private boolean status_ ; - public boolean hasStatus() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public boolean getStatus() { - return status_; - } - public Builder setStatus(boolean value) { - bitField0_ |= 0x00000004; - status_ = value; - onChanged(); - return this; - } - public Builder clearStatus() { - bitField0_ = (bitField0_ & ~0x00000004); - status_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:akka.actor.MyMessage) - } - - static { - defaultInstance = new MyMessage(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:akka.actor.MyMessage) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_akka_actor_MyMessage_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_akka_actor_MyMessage_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\026ProtobufProtocol.proto\022\nakka.actor\"5\n\t" + - "MyMessage\022\n\n\002id\030\001 \002(\004\022\014\n\004name\030\002 \002(\t\022\016\n\006s" + - "tatus\030\003 \002(\010" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_akka_actor_MyMessage_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_akka_actor_MyMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_akka_actor_MyMessage_descriptor, - new java.lang.String[] { "Id", "Name", "Status", }, - akka.actor.ProtobufProtocol.MyMessage.class, - akka.actor.ProtobufProtocol.MyMessage.Builder.class); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/akka-cluster/src/test/protocol/ProtobufProtocol.proto b/akka-cluster/src/test/protocol/ProtobufProtocol.proto deleted file mode 100644 index 404e288e09..0000000000 --- a/akka-cluster/src/test/protocol/ProtobufProtocol.proto +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.actor; - -/* - Compile with: - cd ./akka-remote/src/test/protocol - protoc ProtobufProtocol.proto --java_out ../java -*/ - -message MyMessage { - required uint64 id = 1; - required string name = 2; - required bool status = 3; -} - diff --git a/akka-cluster/src/test/resources/log4j.properties b/akka-cluster/src/test/resources/log4j.properties deleted file mode 100644 index 2d07c8e051..0000000000 --- a/akka-cluster/src/test/resources/log4j.properties +++ /dev/null @@ -1,58 +0,0 @@ -# Define some default values that can be overridden by system properties -zookeeper.root.logger=INFO, CONSOLE -zookeeper.console.threshold=OFF -zookeeper.log.dir=. -zookeeper.log.file=zookeeper.log -zookeeper.log.threshold=DEBUG -zookeeper.tracelog.dir=. -zookeeper.tracelog.file=zookeeper_trace.log - -# -# ZooKeeper Logging Configuration -# - -# Format is " (, )+ - -# DEFAULT: console appender only -log4j.rootLogger=${zookeeper.root.logger} - -# Example with rolling log file -#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE - -# Example with rolling log file and tracing -#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE - -# -# Log INFO level and above messages to the console -# -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold} -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n - -# -# Add ROLLINGFILE to rootLogger to get log file output -# Log DEBUG level and above messages to a log file -log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender -log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold} -log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file} - -# Max log file size of 10MB -log4j.appender.ROLLINGFILE.MaxFileSize=10MB -# uncomment the next line to limit number of backup files -#log4j.appender.ROLLINGFILE.MaxBackupIndex=10 - -log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n - - -# -# Add TRACEFILE to rootLogger to get log file output -# Log DEBUG level and above messages to a log file -log4j.appender.TRACEFILE=org.apache.log4j.FileAppender -log4j.appender.TRACEFILE.Threshold=TRACE -log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file} - -log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout -### Notice we are including log4j's NDC here (%x) -log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n diff --git a/akka-cluster/src/test/resources/logback-test.xml b/akka-cluster/src/test/resources/logback-test.xml deleted file mode 100644 index 240a412687..0000000000 --- a/akka-cluster/src/test/resources/logback-test.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - [%4p] [%d{ISO8601}] [%t] %c{1}: %m%n - - - - - - - - - - - diff --git a/akka-cluster/src/test/resources/zoo.cfg b/akka-cluster/src/test/resources/zoo.cfg deleted file mode 100644 index b71eadcc33..0000000000 --- a/akka-cluster/src/test/resources/zoo.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# The number of milliseconds of each tick -tickTime=2000 -# The number of ticks that the initial -# synchronization phase can take -initLimit=10 -# The number of ticks that can pass between -# sending a request and getting an acknowledgement -syncLimit=5 -# the directory where the snapshot is stored. -dataDir=/export/crawlspace/mahadev/zookeeper/server1/data -# the port at which the clients will connect -clientPort=2181 diff --git a/akka-cluster/src/test/scala/akka/cluster/NetworkFailureSpec.scala b/akka-cluster/src/test/scala/akka/cluster/NetworkFailureSpec.scala deleted file mode 100644 index f5c08f908c..0000000000 --- a/akka-cluster/src/test/scala/akka/cluster/NetworkFailureSpec.scala +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (C) 2009-2011 Typesafe Inc. - */ - -package akka.cluster - -import org.scalatest.{ Spec, WordSpec, BeforeAndAfterAll, BeforeAndAfterEach } -import org.scalatest.matchers.MustMatchers -import org.scalatest.junit.JUnitRunner - -import org.junit.runner.RunWith - -import akka.cluster.netty.NettyRemoteSupport -import akka.actor.{ Actor, ActorRegistry } - -import java.util.concurrent.{ TimeUnit, CountDownLatch } -import java.util.concurrent.atomic.AtomicBoolean - -trait NetworkFailureSpec { self: WordSpec ⇒ - import Actor._ - import akka.util.Duration - - val BytesPerSecond = "60KByte/s" - val DelayMillis = "350ms" - val PortRang = "1024-65535" - - def replyWithTcpResetFor(duration: Duration, dead: AtomicBoolean) = { - spawn { - try { - enableTcpReset() - println("===>>> Reply with [TCP RST] for [" + duration + "]") - Thread.sleep(duration.toMillis) - restoreIP - } catch { - case e ⇒ - dead.set(true) - e.printStackTrace - } - } - } - - def throttleNetworkFor(duration: Duration, dead: AtomicBoolean) = { - spawn { - try { - enableNetworkThrottling() - println("===>>> Throttling network with [" + BytesPerSecond + ", " + DelayMillis + "] for [" + duration + "]") - Thread.sleep(duration.toMillis) - restoreIP - } catch { - case e ⇒ - dead.set(true) - e.printStackTrace - } - } - } - - def dropNetworkFor(duration: Duration, dead: AtomicBoolean) = { - spawn { - try { - enableNetworkDrop() - println("===>>> Blocking network [TCP DENY] for [" + duration + "]") - Thread.sleep(duration.toMillis) - restoreIP - } catch { - case e ⇒ - dead.set(true) - e.printStackTrace - } - } - } - - def sleepFor(duration: Duration) = { - println("===>>> Sleeping for [" + duration + "]") - Thread sleep (duration.toMillis) - } - - def enableNetworkThrottling() = { - restoreIP() - assert(new ProcessBuilder("ipfw", "add", "pipe", "1", "ip", "from", "any", "to", "any").start.waitFor == 0) - assert(new ProcessBuilder("ipfw", "add", "pipe", "2", "ip", "from", "any", "to", "any").start.waitFor == 0) - assert(new ProcessBuilder("ipfw", "pipe", "1", "config", "bw", BytesPerSecond, "delay", DelayMillis).start.waitFor == 0) - assert(new ProcessBuilder("ipfw", "pipe", "2", "config", "bw", BytesPerSecond, "delay", DelayMillis).start.waitFor == 0) - } - - def enableNetworkDrop() = { - restoreIP() - assert(new ProcessBuilder("ipfw", "add", "1", "deny", "tcp", "from", "any", "to", "any", PortRang).start.waitFor == 0) - } - - def enableTcpReset() = { - restoreIP() - assert(new ProcessBuilder("ipfw", "add", "1", "reset", "tcp", "from", "any", "to", "any", PortRang).start.waitFor == 0) - } - - def restoreIP() = { - println("===>>> Restoring network") - assert(new ProcessBuilder("ipfw", "del", "pipe", "1").start.waitFor == 0) - assert(new ProcessBuilder("ipfw", "del", "pipe", "2").start.waitFor == 0) - assert(new ProcessBuilder("ipfw", "flush").start.waitFor == 0) - assert(new ProcessBuilder("ipfw", "pipe", "flush").start.waitFor == 0) - } -} diff --git a/akka-cluster/src/test/scala/akka/serialization/ActorSerializeSpec.scala b/akka-cluster/src/test/scala/akka/serialization/ActorSerializeSpec.scala deleted file mode 100644 index 9d0ff3766d..0000000000 --- a/akka-cluster/src/test/scala/akka/serialization/ActorSerializeSpec.scala +++ /dev/null @@ -1,152 +0,0 @@ -package akka.serialization - -import org.scalatest.Spec -import org.scalatest.matchers.ShouldMatchers -import org.scalatest.BeforeAndAfterAll -import org.scalatest.junit.JUnitRunner -import org.junit.runner.RunWith - -import com.google.protobuf.Message - -import akka.serialization.ActorSerialization._ -import akka.actor._ -import Actor._ -import SerializeSpec._ - -case class MyMessage(id: Long, name: String, status: Boolean) - -@RunWith(classOf[JUnitRunner]) -class ActorSerializeSpec extends Spec with ShouldMatchers with BeforeAndAfterAll { - - describe("Serializable actor") { - it("should be able to serialize and de-serialize a stateful actor with a given serializer") { - - val actor1 = actorOf(Props[MyJavaSerializableActor].withLocalOnly(true)).asInstanceOf[LocalActorRef] - (actor1 ? "hello").get should equal("world 1") - (actor1 ? "hello").get should equal("world 2") - - val bytes = toBinary(actor1) - val actor2 = fromBinary(bytes).start().asInstanceOf[LocalActorRef] - (actor2 ? "hello").get should equal("world 3") - - actor2.receiveTimeout should equal(Some(1000)) - actor1.stop() - actor2.stop() - } - - it("should be able to serialize and deserialize a MyStatelessActorWithMessagesInMailbox") { - - val actor1 = actorOf(Props[MyStatelessActorWithMessagesInMailbox].withLocalOnly(true)).asInstanceOf[LocalActorRef] - for (i ← 1 to 10) actor1 ! "hello" - - actor1.getDispatcher.mailboxSize(actor1) should be > (0) - val actor2 = fromBinary(toBinary(actor1)).asInstanceOf[LocalActorRef] - Thread.sleep(1000) - actor2.getDispatcher.mailboxSize(actor1) should be > (0) - (actor2 ? "hello-reply").get should equal("world") - - val actor3 = fromBinary(toBinary(actor1, false)).asInstanceOf[LocalActorRef] - Thread.sleep(1000) - actor3.getDispatcher.mailboxSize(actor1) should equal(0) - (actor3 ? "hello-reply").get should equal("world") - } - - it("should be able to serialize and deserialize a PersonActorWithMessagesInMailbox") { - - val p1 = Person("debasish ghosh", 25, SerializeSpec.Address("120", "Monroe Street", "Santa Clara", "95050")) - val actor1 = actorOf(Props[PersonActorWithMessagesInMailbox].withLocalOnly(true)).asInstanceOf[LocalActorRef] - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - (actor1 ! p1) - actor1.getDispatcher.mailboxSize(actor1) should be > (0) - val actor2 = fromBinary(toBinary(actor1)).asInstanceOf[LocalActorRef] - Thread.sleep(1000) - actor2.getDispatcher.mailboxSize(actor1) should be > (0) - (actor2 ? "hello-reply").get should equal("hello") - - val actor3 = fromBinary(toBinary(actor1, false)).asInstanceOf[LocalActorRef] - Thread.sleep(1000) - actor3.getDispatcher.mailboxSize(actor1) should equal(0) - (actor3 ? "hello-reply").get should equal("hello") - } - } - - describe("serialize protobuf") { - it("should serialize") { - val msg = MyMessage(123, "debasish ghosh", true) - import akka.serialization.Serialization._ - val b = serialize(ProtobufProtocol.MyMessage.newBuilder.setId(msg.id).setName(msg.name).setStatus(msg.status).build) match { - case Left(exception) ⇒ fail(exception) - case Right(bytes) ⇒ bytes - } - val in = deserialize(b, classOf[ProtobufProtocol.MyMessage], None) match { - case Left(exception) ⇒ fail(exception) - case Right(i) ⇒ i - } - val m = in.asInstanceOf[ProtobufProtocol.MyMessage] - MyMessage(m.getId, m.getName, m.getStatus) should equal(msg) - } - } - - describe("serialize actor that accepts protobuf message") { - it("should serialize") { - - val actor1 = actorOf(Props[MyActorWithProtobufMessagesInMailbox].withLocalOnly(true)).asInstanceOf[LocalActorRef] - val msg = MyMessage(123, "debasish ghosh", true) - val b = ProtobufProtocol.MyMessage.newBuilder.setId(msg.id).setName(msg.name).setStatus(msg.status).build - for (i ← 1 to 10) actor1 ! b - actor1.getDispatcher.mailboxSize(actor1) should be > (0) - val actor2 = fromBinary(toBinary(actor1)).asInstanceOf[LocalActorRef] - Thread.sleep(1000) - actor2.getDispatcher.mailboxSize(actor1) should be > (0) - (actor2 ? "hello-reply").get should equal("world") - - val actor3 = fromBinary(toBinary(actor1, false)).asInstanceOf[LocalActorRef] - Thread.sleep(1000) - actor3.getDispatcher.mailboxSize(actor1) should equal(0) - (actor3 ? "hello-reply").get should equal("world") - } - } -} - -class MyJavaSerializableActor extends Actor with scala.Serializable { - var count = 0 - self.receiveTimeout = Some(1000) - - def receive = { - case "hello" ⇒ - count = count + 1 - self.reply("world " + count) - } -} - -class MyStatelessActorWithMessagesInMailbox extends Actor with scala.Serializable { - def receive = { - case "hello" ⇒ - Thread.sleep(500) - case "hello-reply" ⇒ self.reply("world") - } -} - -class MyActorWithProtobufMessagesInMailbox extends Actor with scala.Serializable { - def receive = { - case m: Message ⇒ - Thread.sleep(500) - case "hello-reply" ⇒ self.reply("world") - } -} - -class PersonActorWithMessagesInMailbox extends Actor with scala.Serializable { - def receive = { - case p: Person ⇒ - Thread.sleep(500) - case "hello-reply" ⇒ self.reply("hello") - } -}