diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java b/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java index 5958f38527..8a186ebf0f 100644 --- a/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java +++ b/akka-core/src/main/java/se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.java @@ -1,4 +1,5 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// source: se/scalablesolutions/akka/remote/protobuf/RemoteProtocol.proto package se.scalablesolutions.akka.remote.protobuf; @@ -10,62 +11,67 @@ public final class RemoteProtocol { public static final class ActorRefProtocol extends com.google.protobuf.GeneratedMessage { // Use ActorRefProtocol.newBuilder() to construct. - private ActorRefProtocol() {} - - private static final ActorRefProtocol defaultInstance = new ActorRefProtocol(); + private ActorRefProtocol() { + initFields(); + } + private ActorRefProtocol(boolean noInit) {} + + private static final ActorRefProtocol defaultInstance; public static ActorRefProtocol getDefaultInstance() { return defaultInstance; } - + public ActorRefProtocol getDefaultInstanceForType() { return defaultInstance; } - + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_fieldAccessorTable; } - + // required string uuid = 1; public static final int UUID_FIELD_NUMBER = 1; private boolean hasUuid; private java.lang.String uuid_ = ""; public boolean hasUuid() { return hasUuid; } public java.lang.String getUuid() { return uuid_; } - + // required string actorClassName = 2; public static final int ACTORCLASSNAME_FIELD_NUMBER = 2; private boolean hasActorClassName; private java.lang.String actorClassName_ = ""; public boolean hasActorClassName() { return hasActorClassName; } public java.lang.String getActorClassName() { return actorClassName_; } - + // required string sourceHostname = 3; public static final int SOURCEHOSTNAME_FIELD_NUMBER = 3; private boolean hasSourceHostname; private java.lang.String sourceHostname_ = ""; public boolean hasSourceHostname() { return hasSourceHostname; } public java.lang.String getSourceHostname() { return sourceHostname_; } - + // required uint32 sourcePort = 4; public static final int SOURCEPORT_FIELD_NUMBER = 4; private boolean hasSourcePort; private int sourcePort_ = 0; public boolean hasSourcePort() { return hasSourcePort; } public int getSourcePort() { return sourcePort_; } - + // required uint64 timeout = 5; public static final int TIMEOUT_FIELD_NUMBER = 5; private boolean hasTimeout; private long timeout_ = 0L; public boolean hasTimeout() { return hasTimeout; } public long getTimeout() { return timeout_; } - + + private void initFields() { + } public final boolean isInitialized() { if (!hasUuid) return false; if (!hasActorClassName) return false; @@ -74,9 +80,10 @@ public final class RemoteProtocol { if (!hasTimeout) return false; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (hasUuid()) { output.writeString(1, getUuid()); } @@ -94,12 +101,12 @@ public final class RemoteProtocol { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (hasUuid()) { size += com.google.protobuf.CodedOutputStream @@ -125,7 +132,7 @@ public final class RemoteProtocol { memoizedSerializedSize = size; return size; } - + public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -162,14 +169,23 @@ public final class RemoteProtocol { } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input).buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input, extensionRegistry) - .buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol parseFrom( com.google.protobuf.CodedInputStream input) @@ -183,31 +199,31 @@ public final class RemoteProtocol { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder { private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol result; - + // Construct using se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.newBuilder() private Builder() {} - + private static Builder create() { Builder builder = new Builder(); builder.result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol(); return builder; } - + protected se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol internalGetResult() { return result; } - + public Builder clear() { if (result == null) { throw new IllegalStateException( @@ -216,20 +232,20 @@ public final class RemoteProtocol { result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol(); return this; } - + public Builder clone() { return create().mergeFrom(result); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDescriptor(); } - + public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol getDefaultInstanceForType() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); } - + public boolean isInitialized() { return result.isInitialized(); } @@ -239,7 +255,7 @@ public final class RemoteProtocol { } return buildPartial(); } - + private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { if (!isInitialized()) { @@ -248,7 +264,7 @@ public final class RemoteProtocol { } return buildPartial(); } - + public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol buildPartial() { if (result == null) { throw new IllegalStateException( @@ -258,7 +274,7 @@ public final class RemoteProtocol { result = null; return returnMe; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol) { return mergeFrom((se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol)other); @@ -267,7 +283,7 @@ public final class RemoteProtocol { return this; } } - + public Builder mergeFrom(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol other) { if (other == se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance()) return this; if (other.hasUuid()) { @@ -288,7 +304,7 @@ public final class RemoteProtocol { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -333,8 +349,8 @@ public final class RemoteProtocol { } } } - - + + // required string uuid = 1; public boolean hasUuid() { return result.hasUuid(); @@ -355,7 +371,7 @@ public final class RemoteProtocol { result.uuid_ = getDefaultInstance().getUuid(); return this; } - + // required string actorClassName = 2; public boolean hasActorClassName() { return result.hasActorClassName(); @@ -376,7 +392,7 @@ public final class RemoteProtocol { result.actorClassName_ = getDefaultInstance().getActorClassName(); return this; } - + // required string sourceHostname = 3; public boolean hasSourceHostname() { return result.hasSourceHostname(); @@ -397,7 +413,7 @@ public final class RemoteProtocol { result.sourceHostname_ = getDefaultInstance().getSourceHostname(); return this; } - + // required uint32 sourcePort = 4; public boolean hasSourcePort() { return result.hasSourcePort(); @@ -415,7 +431,7 @@ public final class RemoteProtocol { result.sourcePort_ = 0; return this; } - + // required uint64 timeout = 5; public boolean hasTimeout() { return result.hasTimeout(); @@ -433,132 +449,140 @@ public final class RemoteProtocol { result.timeout_ = 0L; return this; } + + // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol) } - - static { - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.getDescriptor(); - } - + static { + defaultInstance = new ActorRefProtocol(true); se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); } + + // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol) } - + public static final class RemoteRequestProtocol extends com.google.protobuf.GeneratedMessage { // Use RemoteRequestProtocol.newBuilder() to construct. - private RemoteRequestProtocol() {} - - private static final RemoteRequestProtocol defaultInstance = new RemoteRequestProtocol(); + private RemoteRequestProtocol() { + initFields(); + } + private RemoteRequestProtocol(boolean noInit) {} + + private static final RemoteRequestProtocol defaultInstance; public static RemoteRequestProtocol getDefaultInstance() { return defaultInstance; } - + public RemoteRequestProtocol getDefaultInstanceForType() { return defaultInstance; } - + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteRequestProtocol_fieldAccessorTable; } - + // required uint64 id = 1; public static final int ID_FIELD_NUMBER = 1; private boolean hasId; private long id_ = 0L; public boolean hasId() { return hasId; } public long getId() { return id_; } - + // required uint32 protocol = 2; public static final int PROTOCOL_FIELD_NUMBER = 2; private boolean hasProtocol; private int protocol_ = 0; public boolean hasProtocol() { return hasProtocol; } public int getProtocol() { return protocol_; } - + // required bytes message = 3; public static final int MESSAGE_FIELD_NUMBER = 3; private boolean hasMessage; private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; public boolean hasMessage() { return hasMessage; } public com.google.protobuf.ByteString getMessage() { return message_; } - + // optional bytes messageManifest = 4; public static final int MESSAGEMANIFEST_FIELD_NUMBER = 4; private boolean hasMessageManifest; private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; public boolean hasMessageManifest() { return hasMessageManifest; } public com.google.protobuf.ByteString getMessageManifest() { return messageManifest_; } - + // optional string method = 5; public static final int METHOD_FIELD_NUMBER = 5; private boolean hasMethod; private java.lang.String method_ = ""; public boolean hasMethod() { return hasMethod; } public java.lang.String getMethod() { return method_; } - + // required string target = 6; public static final int TARGET_FIELD_NUMBER = 6; private boolean hasTarget; private java.lang.String target_ = ""; public boolean hasTarget() { return hasTarget; } public java.lang.String getTarget() { return target_; } - + // required string uuid = 7; public static final int UUID_FIELD_NUMBER = 7; private boolean hasUuid; private java.lang.String uuid_ = ""; public boolean hasUuid() { return hasUuid; } public java.lang.String getUuid() { return uuid_; } - + // required uint64 timeout = 8; public static final int TIMEOUT_FIELD_NUMBER = 8; private boolean hasTimeout; private long timeout_ = 0L; public boolean hasTimeout() { return hasTimeout; } public long getTimeout() { return timeout_; } - + // optional string supervisorUuid = 9; public static final int SUPERVISORUUID_FIELD_NUMBER = 9; private boolean hasSupervisorUuid; private java.lang.String supervisorUuid_ = ""; public boolean hasSupervisorUuid() { return hasSupervisorUuid; } public java.lang.String getSupervisorUuid() { return supervisorUuid_; } - + // required bool isActor = 10; public static final int ISACTOR_FIELD_NUMBER = 10; private boolean hasIsActor; private boolean isActor_ = false; public boolean hasIsActor() { return hasIsActor; } public boolean getIsActor() { return isActor_; } - + // required bool isOneWay = 11; public static final int ISONEWAY_FIELD_NUMBER = 11; private boolean hasIsOneWay; private boolean isOneWay_ = false; public boolean hasIsOneWay() { return hasIsOneWay; } public boolean getIsOneWay() { return isOneWay_; } - + // required bool isEscaped = 12; public static final int ISESCAPED_FIELD_NUMBER = 12; private boolean hasIsEscaped; private boolean isEscaped_ = false; public boolean hasIsEscaped() { return hasIsEscaped; } public boolean getIsEscaped() { return isEscaped_; } - + // optional .se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol sender = 13; public static final int SENDER_FIELD_NUMBER = 13; private boolean hasSender; - private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol sender_ = se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); + private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol sender_; public boolean hasSender() { return hasSender; } public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol getSender() { return sender_; } - + + private void initFields() { + sender_ = se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); + } public final boolean isInitialized() { if (!hasId) return false; if (!hasProtocol) return false; @@ -574,9 +598,10 @@ public final class RemoteProtocol { } return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (hasId()) { output.writeUInt64(1, getId()); } @@ -618,12 +643,12 @@ public final class RemoteProtocol { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (hasId()) { size += com.google.protobuf.CodedOutputStream @@ -681,7 +706,7 @@ public final class RemoteProtocol { memoizedSerializedSize = size; return size; } - + public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -718,14 +743,23 @@ public final class RemoteProtocol { } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input).buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input, extensionRegistry) - .buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol parseFrom( com.google.protobuf.CodedInputStream input) @@ -739,31 +773,31 @@ public final class RemoteProtocol { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder { private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol result; - + // Construct using se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.newBuilder() private Builder() {} - + private static Builder create() { Builder builder = new Builder(); builder.result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol(); return builder; } - + protected se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol internalGetResult() { return result; } - + public Builder clear() { if (result == null) { throw new IllegalStateException( @@ -772,20 +806,20 @@ public final class RemoteProtocol { result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol(); return this; } - + public Builder clone() { return create().mergeFrom(result); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.getDescriptor(); } - + public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol getDefaultInstanceForType() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.getDefaultInstance(); } - + public boolean isInitialized() { return result.isInitialized(); } @@ -795,7 +829,7 @@ public final class RemoteProtocol { } return buildPartial(); } - + private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { if (!isInitialized()) { @@ -804,7 +838,7 @@ public final class RemoteProtocol { } return buildPartial(); } - + public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol buildPartial() { if (result == null) { throw new IllegalStateException( @@ -814,7 +848,7 @@ public final class RemoteProtocol { result = null; return returnMe; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol) { return mergeFrom((se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol)other); @@ -823,7 +857,7 @@ public final class RemoteProtocol { return this; } } - + public Builder mergeFrom(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol other) { if (other == se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteRequestProtocol.getDefaultInstance()) return this; if (other.hasId()) { @@ -868,7 +902,7 @@ public final class RemoteProtocol { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -950,8 +984,8 @@ public final class RemoteProtocol { } } } - - + + // required uint64 id = 1; public boolean hasId() { return result.hasId(); @@ -969,7 +1003,7 @@ public final class RemoteProtocol { result.id_ = 0L; return this; } - + // required uint32 protocol = 2; public boolean hasProtocol() { return result.hasProtocol(); @@ -987,7 +1021,7 @@ public final class RemoteProtocol { result.protocol_ = 0; return this; } - + // required bytes message = 3; public boolean hasMessage() { return result.hasMessage(); @@ -1008,7 +1042,7 @@ public final class RemoteProtocol { result.message_ = getDefaultInstance().getMessage(); return this; } - + // optional bytes messageManifest = 4; public boolean hasMessageManifest() { return result.hasMessageManifest(); @@ -1029,7 +1063,7 @@ public final class RemoteProtocol { result.messageManifest_ = getDefaultInstance().getMessageManifest(); return this; } - + // optional string method = 5; public boolean hasMethod() { return result.hasMethod(); @@ -1050,7 +1084,7 @@ public final class RemoteProtocol { result.method_ = getDefaultInstance().getMethod(); return this; } - + // required string target = 6; public boolean hasTarget() { return result.hasTarget(); @@ -1071,7 +1105,7 @@ public final class RemoteProtocol { result.target_ = getDefaultInstance().getTarget(); return this; } - + // required string uuid = 7; public boolean hasUuid() { return result.hasUuid(); @@ -1092,7 +1126,7 @@ public final class RemoteProtocol { result.uuid_ = getDefaultInstance().getUuid(); return this; } - + // required uint64 timeout = 8; public boolean hasTimeout() { return result.hasTimeout(); @@ -1110,7 +1144,7 @@ public final class RemoteProtocol { result.timeout_ = 0L; return this; } - + // optional string supervisorUuid = 9; public boolean hasSupervisorUuid() { return result.hasSupervisorUuid(); @@ -1131,7 +1165,7 @@ public final class RemoteProtocol { result.supervisorUuid_ = getDefaultInstance().getSupervisorUuid(); return this; } - + // required bool isActor = 10; public boolean hasIsActor() { return result.hasIsActor(); @@ -1149,7 +1183,7 @@ public final class RemoteProtocol { result.isActor_ = false; return this; } - + // required bool isOneWay = 11; public boolean hasIsOneWay() { return result.hasIsOneWay(); @@ -1167,7 +1201,7 @@ public final class RemoteProtocol { result.isOneWay_ = false; return this; } - + // required bool isEscaped = 12; public boolean hasIsEscaped() { return result.hasIsEscaped(); @@ -1185,7 +1219,7 @@ public final class RemoteProtocol { result.isEscaped_ = false; return this; } - + // optional .se.scalablesolutions.akka.remote.protobuf.ActorRefProtocol sender = 13; public boolean hasSender() { return result.hasSender(); @@ -1222,106 +1256,114 @@ public final class RemoteProtocol { result.sender_ = se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.ActorRefProtocol.getDefaultInstance(); return this; } + + // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.remote.protobuf.RemoteRequestProtocol) } - - static { - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.getDescriptor(); - } - + static { + defaultInstance = new RemoteRequestProtocol(true); se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); } + + // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.remote.protobuf.RemoteRequestProtocol) } - + public static final class RemoteReplyProtocol extends com.google.protobuf.GeneratedMessage { // Use RemoteReplyProtocol.newBuilder() to construct. - private RemoteReplyProtocol() {} - - private static final RemoteReplyProtocol defaultInstance = new RemoteReplyProtocol(); + private RemoteReplyProtocol() { + initFields(); + } + private RemoteReplyProtocol(boolean noInit) {} + + private static final RemoteReplyProtocol defaultInstance; public static RemoteReplyProtocol getDefaultInstance() { return defaultInstance; } - + public RemoteReplyProtocol getDefaultInstanceForType() { return defaultInstance; } - + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_fieldAccessorTable; } - + // required uint64 id = 1; public static final int ID_FIELD_NUMBER = 1; private boolean hasId; private long id_ = 0L; public boolean hasId() { return hasId; } public long getId() { return id_; } - + // optional uint32 protocol = 2; public static final int PROTOCOL_FIELD_NUMBER = 2; private boolean hasProtocol; private int protocol_ = 0; public boolean hasProtocol() { return hasProtocol; } public int getProtocol() { return protocol_; } - + // optional bytes message = 3; public static final int MESSAGE_FIELD_NUMBER = 3; private boolean hasMessage; private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; public boolean hasMessage() { return hasMessage; } public com.google.protobuf.ByteString getMessage() { return message_; } - + // optional bytes messageManifest = 4; public static final int MESSAGEMANIFEST_FIELD_NUMBER = 4; private boolean hasMessageManifest; private com.google.protobuf.ByteString messageManifest_ = com.google.protobuf.ByteString.EMPTY; public boolean hasMessageManifest() { return hasMessageManifest; } public com.google.protobuf.ByteString getMessageManifest() { return messageManifest_; } - + // optional string exception = 5; public static final int EXCEPTION_FIELD_NUMBER = 5; private boolean hasException; private java.lang.String exception_ = ""; public boolean hasException() { return hasException; } public java.lang.String getException() { return exception_; } - + // optional string supervisorUuid = 6; public static final int SUPERVISORUUID_FIELD_NUMBER = 6; private boolean hasSupervisorUuid; private java.lang.String supervisorUuid_ = ""; public boolean hasSupervisorUuid() { return hasSupervisorUuid; } public java.lang.String getSupervisorUuid() { return supervisorUuid_; } - + // required bool isActor = 7; public static final int ISACTOR_FIELD_NUMBER = 7; private boolean hasIsActor; private boolean isActor_ = false; public boolean hasIsActor() { return hasIsActor; } public boolean getIsActor() { return isActor_; } - + // required bool isSuccessful = 8; public static final int ISSUCCESSFUL_FIELD_NUMBER = 8; private boolean hasIsSuccessful; private boolean isSuccessful_ = false; public boolean hasIsSuccessful() { return hasIsSuccessful; } public boolean getIsSuccessful() { return isSuccessful_; } - + + private void initFields() { + } public final boolean isInitialized() { if (!hasId) return false; if (!hasIsActor) return false; if (!hasIsSuccessful) return false; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (hasId()) { output.writeUInt64(1, getId()); } @@ -1348,12 +1390,12 @@ public final class RemoteProtocol { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (hasId()) { size += com.google.protobuf.CodedOutputStream @@ -1391,7 +1433,7 @@ public final class RemoteProtocol { memoizedSerializedSize = size; return size; } - + public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1428,14 +1470,23 @@ public final class RemoteProtocol { } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input).buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input, extensionRegistry) - .buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol parseFrom( com.google.protobuf.CodedInputStream input) @@ -1449,31 +1500,31 @@ public final class RemoteProtocol { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder { private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol result; - + // Construct using se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.newBuilder() private Builder() {} - + private static Builder create() { Builder builder = new Builder(); builder.result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol(); return builder; } - + protected se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol internalGetResult() { return result; } - + public Builder clear() { if (result == null) { throw new IllegalStateException( @@ -1482,20 +1533,20 @@ public final class RemoteProtocol { result = new se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol(); return this; } - + public Builder clone() { return create().mergeFrom(result); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.getDescriptor(); } - + public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol getDefaultInstanceForType() { return se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.getDefaultInstance(); } - + public boolean isInitialized() { return result.isInitialized(); } @@ -1505,7 +1556,7 @@ public final class RemoteProtocol { } return buildPartial(); } - + private se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { if (!isInitialized()) { @@ -1514,7 +1565,7 @@ public final class RemoteProtocol { } return buildPartial(); } - + public se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol buildPartial() { if (result == null) { throw new IllegalStateException( @@ -1524,7 +1575,7 @@ public final class RemoteProtocol { result = null; return returnMe; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol) { return mergeFrom((se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol)other); @@ -1533,7 +1584,7 @@ public final class RemoteProtocol { return this; } } - + public Builder mergeFrom(se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol other) { if (other == se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.RemoteReplyProtocol.getDefaultInstance()) return this; if (other.hasId()) { @@ -1563,7 +1614,7 @@ public final class RemoteProtocol { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1620,8 +1671,8 @@ public final class RemoteProtocol { } } } - - + + // required uint64 id = 1; public boolean hasId() { return result.hasId(); @@ -1639,7 +1690,7 @@ public final class RemoteProtocol { result.id_ = 0L; return this; } - + // optional uint32 protocol = 2; public boolean hasProtocol() { return result.hasProtocol(); @@ -1657,7 +1708,7 @@ public final class RemoteProtocol { result.protocol_ = 0; return this; } - + // optional bytes message = 3; public boolean hasMessage() { return result.hasMessage(); @@ -1678,7 +1729,7 @@ public final class RemoteProtocol { result.message_ = getDefaultInstance().getMessage(); return this; } - + // optional bytes messageManifest = 4; public boolean hasMessageManifest() { return result.hasMessageManifest(); @@ -1699,7 +1750,7 @@ public final class RemoteProtocol { result.messageManifest_ = getDefaultInstance().getMessageManifest(); return this; } - + // optional string exception = 5; public boolean hasException() { return result.hasException(); @@ -1720,7 +1771,7 @@ public final class RemoteProtocol { result.exception_ = getDefaultInstance().getException(); return this; } - + // optional string supervisorUuid = 6; public boolean hasSupervisorUuid() { return result.hasSupervisorUuid(); @@ -1741,7 +1792,7 @@ public final class RemoteProtocol { result.supervisorUuid_ = getDefaultInstance().getSupervisorUuid(); return this; } - + // required bool isActor = 7; public boolean hasIsActor() { return result.hasIsActor(); @@ -1759,7 +1810,7 @@ public final class RemoteProtocol { result.isActor_ = false; return this; } - + // required bool isSuccessful = 8; public boolean hasIsSuccessful() { return result.hasIsSuccessful(); @@ -1777,17 +1828,19 @@ public final class RemoteProtocol { result.isSuccessful_ = false; return this; } + + // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.remote.protobuf.RemoteReplyProtocol) } - - static { - se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.getDescriptor(); - } - + static { + defaultInstance = new RemoteReplyProtocol(true); se.scalablesolutions.akka.remote.protobuf.RemoteProtocol.internalForceInit(); + defaultInstance.initFields(); } + + // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.remote.protobuf.RemoteReplyProtocol) } - + private static com.google.protobuf.Descriptors.Descriptor internal_static_se_scalablesolutions_akka_remote_protobuf_ActorRefProtocol_descriptor; private static @@ -1803,7 +1856,7 @@ public final class RemoteProtocol { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_se_scalablesolutions_akka_remote_protobuf_RemoteReplyProtocol_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -1868,6 +1921,8 @@ public final class RemoteProtocol { new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } - + public static void internalForceInit() {} + + // @@protoc_insertion_point(outer_class_scope) } diff --git a/akka-core/src/main/scala/actor/ActorRef.scala b/akka-core/src/main/scala/actor/ActorRef.scala index 42745c733f..ec96b87bf2 100644 --- a/akka-core/src/main/scala/actor/ActorRef.scala +++ b/akka-core/src/main/scala/actor/ActorRef.scala @@ -968,10 +968,12 @@ sealed class LocalActorRef private[akka]( } private def joinTransaction(message: Any) = if (isTransactionSetInScope) { - // FIXME test to run bench without this trace call - Actor.log.trace("Joining transaction set [%s];\n\tactor %s\n\twith message [%s]", - getTransactionSetInScope, toString, message) - getTransactionSetInScope.incParties + import org.multiverse.api.ThreadLocalTransaction + val txSet = getTransactionSetInScope + Actor.log.trace("Joining transaction set [%s];\n\tactor %s\n\twith message [%s]", txSet, toString, message) // FIXME test to run bench without this trace call + val mtx = ThreadLocalTransaction.getThreadLocalTransaction + if ((mtx eq null) || mtx.getStatus.isDead) txSet.incParties + else txSet.incParties(mtx, 1) } /** @@ -1049,7 +1051,9 @@ sealed class LocalActorRef private[akka]( _isBeingRestarted = true // abort transaction set if (isTransactionSetInScope) try { - getTransactionSetInScope.abort + val txSet = getTransactionSetInScope + Actor.log.debug("Aborting transaction set [%s]", txSet) + txSet.abort } catch { case e: IllegalStateException => {} } Actor.log.error(e, "Exception when invoking \n\tactor [%s] \n\twith message [%s]", this, message) diff --git a/akka-core/src/main/scala/stm/Transaction.scala b/akka-core/src/main/scala/stm/Transaction.scala index 787896682d..dfd6c53fdf 100644 --- a/akka-core/src/main/scala/stm/Transaction.scala +++ b/akka-core/src/main/scala/stm/Transaction.scala @@ -250,6 +250,10 @@ object Transaction { */ def foreach(f: => Unit): Unit = atomic {f} + +// FIXME tryJoinCommit(mtx, TransactionManagement.TRANSACTION_TIMEOUT, TimeUnit.MILLISECONDS) +//getTransactionSetInScope.tryJoinCommit(mtx, TransactionManagement.TRANSACTION_TIMEOUT, TimeUnit.MILLISECONDS) + /** * See ScalaDoc on Transaction.Global class. */ @@ -262,10 +266,6 @@ object Transaction { val txSet = getTransactionSetInScope log.trace("Committing transaction [%s]\n\tby joining transaction set [%s]", mtx, txSet) txSet.joinCommit(mtx) - - // FIXME tryJoinCommit(mtx, TransactionManagement.TRANSACTION_TIMEOUT, TimeUnit.MILLISECONDS) - //getTransactionSetInScope.tryJoinCommit(mtx, TransactionManagement.TRANSACTION_TIMEOUT, TimeUnit.MILLISECONDS) - clearTransaction result } @@ -280,16 +280,15 @@ object Transaction { tx.begin tx.transaction = Some(mtx) setTransaction(Some(tx)) - txSet.registerOnCommitTask(new Runnable() { - def run = { - log.trace("=========> Committing transaction [%s]", mtx) - tx.commit - } - }) - txSet.registerOnAbortTask(new Runnable() { - def run = { - log.trace("=========> Aborting transaction [%s]", mtx) - tx.abort + mtx.registerLifecycleListener(new TransactionLifecycleListener() { + def notify(mtx: MultiverseTransaction, event: TransactionLifecycleEvent) = event.name match { + case "postCommit" => + log.trace("Committing transaction [%s]", mtx) + tx.commit + case "postAbort" => + log.trace("Aborting transaction [%s]", mtx) + tx.abort + case _ => {} } }) } diff --git a/akka-core/src/main/scala/stm/TransactionalState.scala b/akka-core/src/main/scala/stm/TransactionalState.scala index 2575194090..e3e3f4ac7f 100644 --- a/akka-core/src/main/scala/stm/TransactionalState.scala +++ b/akka-core/src/main/scala/stm/TransactionalState.scala @@ -205,7 +205,7 @@ class TransactionalRef[T](initialOpt: Option[T] = None) extends Transactional { } private def ensureIsInTransaction = - if (getThreadLocalTransaction eq null) throw new NoTransactionInScopeException + ()// if (getThreadLocalTransaction eq null) throw new NoTransactionInScopeException private def ensureNotNull = if (ref.isNull) throw new RuntimeException("Cannot alter Ref's value when it is null") diff --git a/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java b/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java index 31b97339d1..0f9455e13c 100644 --- a/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java +++ b/akka-core/src/test/java/se/scalablesolutions/akka/actor/ProtobufProtocol.java @@ -1,4 +1,5 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ProtobufProtocol.proto package se.scalablesolutions.akka.actor; @@ -10,57 +11,63 @@ public final class ProtobufProtocol { public static final class ProtobufPOJO extends com.google.protobuf.GeneratedMessage { // Use ProtobufPOJO.newBuilder() to construct. - private ProtobufPOJO() {} - - private static final ProtobufPOJO defaultInstance = new ProtobufPOJO(); + private ProtobufPOJO() { + initFields(); + } + private ProtobufPOJO(boolean noInit) {} + + private static final ProtobufPOJO defaultInstance; public static ProtobufPOJO getDefaultInstance() { return defaultInstance; } - + public ProtobufPOJO getDefaultInstanceForType() { return defaultInstance; } - + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return se.scalablesolutions.akka.actor.ProtobufProtocol.internal_static_se_scalablesolutions_akka_actor_ProtobufPOJO_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return se.scalablesolutions.akka.actor.ProtobufProtocol.internal_static_se_scalablesolutions_akka_actor_ProtobufPOJO_fieldAccessorTable; } - + // required uint64 id = 1; public static final int ID_FIELD_NUMBER = 1; private boolean hasId; private long id_ = 0L; public boolean hasId() { return hasId; } public long getId() { return id_; } - + // required string name = 2; public static final int NAME_FIELD_NUMBER = 2; private boolean hasName; private java.lang.String name_ = ""; public boolean hasName() { return hasName; } public java.lang.String getName() { return name_; } - + // required bool status = 3; public static final int STATUS_FIELD_NUMBER = 3; private boolean hasStatus; private boolean status_ = false; public boolean hasStatus() { return hasStatus; } public boolean getStatus() { return status_; } - + + private void initFields() { + } public final boolean isInitialized() { if (!hasId) return false; if (!hasName) return false; if (!hasStatus) return false; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (hasId()) { output.writeUInt64(1, getId()); } @@ -72,12 +79,12 @@ public final class ProtobufProtocol { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (hasId()) { size += com.google.protobuf.CodedOutputStream @@ -95,7 +102,7 @@ public final class ProtobufProtocol { memoizedSerializedSize = size; return size; } - + public static se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -132,14 +139,23 @@ public final class ProtobufProtocol { } public static se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input).buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeDelimitedFrom(input, extensionRegistry) - .buildParsed(); + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } public static se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO parseFrom( com.google.protobuf.CodedInputStream input) @@ -153,31 +169,31 @@ public final class ProtobufProtocol { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder { private se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO result; - + // Construct using se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO.newBuilder() private Builder() {} - + private static Builder create() { Builder builder = new Builder(); builder.result = new se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO(); return builder; } - + protected se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO internalGetResult() { return result; } - + public Builder clear() { if (result == null) { throw new IllegalStateException( @@ -186,20 +202,20 @@ public final class ProtobufProtocol { result = new se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO(); return this; } - + public Builder clone() { return create().mergeFrom(result); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO.getDescriptor(); } - + public se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO getDefaultInstanceForType() { return se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO.getDefaultInstance(); } - + public boolean isInitialized() { return result.isInitialized(); } @@ -209,7 +225,7 @@ public final class ProtobufProtocol { } return buildPartial(); } - + private se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { if (!isInitialized()) { @@ -218,7 +234,7 @@ public final class ProtobufProtocol { } return buildPartial(); } - + public se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO buildPartial() { if (result == null) { throw new IllegalStateException( @@ -228,7 +244,7 @@ public final class ProtobufProtocol { result = null; return returnMe; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO) { return mergeFrom((se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO)other); @@ -237,7 +253,7 @@ public final class ProtobufProtocol { return this; } } - + public Builder mergeFrom(se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO other) { if (other == se.scalablesolutions.akka.actor.ProtobufProtocol.ProtobufPOJO.getDefaultInstance()) return this; if (other.hasId()) { @@ -252,7 +268,7 @@ public final class ProtobufProtocol { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -289,8 +305,8 @@ public final class ProtobufProtocol { } } } - - + + // required uint64 id = 1; public boolean hasId() { return result.hasId(); @@ -308,7 +324,7 @@ public final class ProtobufProtocol { result.id_ = 0L; return this; } - + // required string name = 2; public boolean hasName() { return result.hasName(); @@ -329,7 +345,7 @@ public final class ProtobufProtocol { result.name_ = getDefaultInstance().getName(); return this; } - + // required bool status = 3; public boolean hasStatus() { return result.hasStatus(); @@ -347,23 +363,25 @@ public final class ProtobufProtocol { result.status_ = false; return this; } + + // @@protoc_insertion_point(builder_scope:se.scalablesolutions.akka.actor.ProtobufPOJO) } - - static { - se.scalablesolutions.akka.actor.ProtobufProtocol.getDescriptor(); - } - + static { + defaultInstance = new ProtobufPOJO(true); se.scalablesolutions.akka.actor.ProtobufProtocol.internalForceInit(); + defaultInstance.initFields(); } + + // @@protoc_insertion_point(class_scope:se.scalablesolutions.akka.actor.ProtobufPOJO) } - + private static com.google.protobuf.Descriptors.Descriptor internal_static_se_scalablesolutions_akka_actor_ProtobufPOJO_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_se_scalablesolutions_akka_actor_ProtobufPOJO_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -397,6 +415,8 @@ public final class ProtobufProtocol { new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } - + public static void internalForceInit() {} + + // @@protoc_insertion_point(outer_class_scope) } diff --git a/akka-core/src/test/scala/StmSpec.scala b/akka-core/src/test/scala/StmSpec.scala index 28ec49a338..401545d50c 100644 --- a/akka-core/src/test/scala/StmSpec.scala +++ b/akka-core/src/test/scala/StmSpec.scala @@ -101,6 +101,52 @@ class StmSpec extends } } } + /* + describe("Multiverse API") { + it("should blablabla") { + + import org.multiverse.api.programmatic._ +// import org.multiverse.api._ + import org.multiverse.templates._ + import java.util.concurrent.atomic._ + import se.scalablesolutions.akka.stm.Ref + import org.multiverse.api.{GlobalStmInstance, ThreadLocalTransaction, Transaction => MultiverseTransaction} + import org.multiverse.api.lifecycle.{TransactionLifecycleListener, TransactionLifecycleEvent} + import org.multiverse.commitbarriers._ + + def createRef[T]: ProgrammaticReference[T] = GlobalStmInstance + .getGlobalStmInstance + .getProgrammaticReferenceFactoryBuilder + .build + .atomicCreateReference(null.asInstanceOf[T]) + + val ref1 = Ref(0)//createRef[Int] + val ref2 = Ref(0)//createRef[Int] + + val committedCount = new AtomicInteger + val abortedCount = new AtomicInteger + val barrierHolder = new AtomicReference[CountDownCommitBarrier] + + val template = new TransactionTemplate[Int]() { + override def onStart(tx: MultiverseTransaction) = barrierHolder.set(new CountDownCommitBarrier(1)) + override def execute(tx: MultiverseTransaction): Int = { + ref1.swap(ref1.get.get + 1) + ref2.swap(ref2.get.get + 1) + barrierHolder.get.joinCommit(tx) + null.asInstanceOf[Int] + } + override def onPostCommit = committedCount.incrementAndGet + override def onPostAbort = abortedCount.incrementAndGet + } + template.execute + + ref1.get.get should equal(1) + ref2.get.get should equal(1) + committedCount.get should equal(1) + abortedCount.get should equal(2) + } + } + */ } object GlobalTransactionVectorTestActor { diff --git a/akka-http/src/main/scala/AkkaLoader.scala b/akka-http/src/main/scala/AkkaLoader.scala index 8513f5ea8c..431758e2c7 100644 --- a/akka-http/src/main/scala/AkkaLoader.scala +++ b/akka-http/src/main/scala/AkkaLoader.scala @@ -47,7 +47,6 @@ class AkkaLoader extends Logging { private def printBanner = { log.info( """ -================================================== t t t t t t tt t @@ -70,9 +69,10 @@ class AkkaLoader extends Logging { ttt ttt ttt ttt ttt ttt ttt ttt ttt tt ttt ttt ttt ttt ttt ttt tttttttt ttt ttt ttt ttt tttttttt + ================================================== """) - log.info(" Running version %s", Config.VERSION) + log.info(" Running version %s", Config.VERSION) log.info("==================================================") } } diff --git a/akka-samples/akka-sample-camel/src/main/scala/Boot.scala b/akka-samples/akka-sample-camel/src/main/scala/Boot.scala index ba1ccf5fee..810f31aba5 100644 --- a/akka-samples/akka-sample-camel/src/main/scala/Boot.scala +++ b/akka-samples/akka-sample-camel/src/main/scala/Boot.scala @@ -28,8 +28,8 @@ class Boot { val factory = SupervisorFactory( SupervisorConfig( RestartStrategy(OneForOne, 3, 100, List(classOf[Exception])), - Supervise(actorOf[Consumer1].start, LifeCycle(Permanent)) :: - Supervise(actorOf[Consumer2].start, LifeCycle(Permanent)) :: Nil)) + Supervise(actorOf[Consumer1], LifeCycle(Permanent)) :: + Supervise(actorOf[Consumer2], LifeCycle(Permanent)) :: Nil)) factory.newInstance.start // Routing example diff --git a/embedded-repo/net/lag/configgy/2.8.0.RC3-1.5.2-SNAPSHOT/configgy-2.8.0.RC3-1.5.2-SNAPSHOT.jar b/embedded-repo/net/lag/configgy/2.8.0.RC3-1.5.2-SNAPSHOT/configgy-2.8.0.RC3-1.5.2-SNAPSHOT.jar new file mode 100644 index 0000000000..0291dea399 Binary files /dev/null and b/embedded-repo/net/lag/configgy/2.8.0.RC3-1.5.2-SNAPSHOT/configgy-2.8.0.RC3-1.5.2-SNAPSHOT.jar differ diff --git a/embedded-repo/net/lag/configgy/2.8.0.RC3-1.5.2-SNAPSHOT/configgy-2.8.0.RC3-1.5.2-SNAPSHOT.pom b/embedded-repo/net/lag/configgy/2.8.0.RC3-1.5.2-SNAPSHOT/configgy-2.8.0.RC3-1.5.2-SNAPSHOT.pom new file mode 100644 index 0000000000..350e63729c --- /dev/null +++ b/embedded-repo/net/lag/configgy/2.8.0.RC3-1.5.2-SNAPSHOT/configgy-2.8.0.RC3-1.5.2-SNAPSHOT.pom @@ -0,0 +1,8 @@ + + + 4.0.0 + net.lag + configgy + 2.8.0.RC3-1.5.2-SNAPSHOT + diff --git a/embedded-repo/sjson/json/sjson/0.6-SNAPSHOT-2.8.RC3/sjson-0.6-SNAPSHOT-2.8.RC3.jar b/embedded-repo/sjson/json/sjson/0.6-SNAPSHOT-2.8.RC3/sjson-0.6-SNAPSHOT-2.8.RC3.jar index 1762ffd385..5cf971df15 100644 Binary files a/embedded-repo/sjson/json/sjson/0.6-SNAPSHOT-2.8.RC3/sjson-0.6-SNAPSHOT-2.8.RC3.jar and b/embedded-repo/sjson/json/sjson/0.6-SNAPSHOT-2.8.RC3/sjson-0.6-SNAPSHOT-2.8.RC3.jar differ diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index cb0d2ced2a..749557360f 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -183,10 +183,10 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) { val jta_1_1 = "org.apache.geronimo.specs" % "geronimo-jta_1.1_spec" % "1.1.1" % "compile" val werkz = "org.codehaus.aspectwerkz" % "aspectwerkz-nodeps-jdk5" % "2.1" % "compile" val werkz_core = "org.codehaus.aspectwerkz" % "aspectwerkz-jdk5" % "2.1" % "compile" - val configgy = "net.lag" % "configgy" % "2.8.0.RC2-1.5.2-SNAPSHOT" % "compile" + val configgy = "net.lag" % "configgy" % "2.8.0.RC3-1.5.2-SNAPSHOT" % "compile" val guicey = "org.guiceyfruit" % "guice-all" % "2.0" % "compile" val aopalliance = "aopalliance" % "aopalliance" % "1.0" % "compile" - val protobuf = "com.google.protobuf" % "protobuf-java" % "2.2.0" % "compile" + val protobuf = "com.google.protobuf" % "protobuf-java" % "2.3.0" % "compile" val multiverse = "org.multiverse" % "multiverse-alpha" % MULTIVERSE_VERSION % "compile" val jgroups = "jgroups" % "jgroups" % "2.9.0.GA" % "compile"