splitted kernel up in core + many sub modules
This commit is contained in:
parent
deeaa923d1
commit
ab6637044f
154 changed files with 1510 additions and 2651 deletions
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface configuration {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface immutable {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface oneway {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface postrestart {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface prerestart {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface state {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface transactionrequired {}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.kernel.config;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Singleton;
|
||||
//import com.google.inject.jsr250.ResourceProviderFactory;
|
||||
|
||||
/**
|
||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
public class ActiveObjectGuiceModule extends AbstractModule {
|
||||
private final List<DependencyBinding> bindings;
|
||||
|
||||
public ActiveObjectGuiceModule(final List<DependencyBinding> bindings) {
|
||||
this.bindings = bindings;
|
||||
}
|
||||
|
||||
protected void configure() {
|
||||
//bind(ResourceProviderFactory.class);
|
||||
for (int i = 0; i < bindings.size(); i++) {
|
||||
final DependencyBinding db = bindings.get(i);
|
||||
//if (db.getInterface() != null) bind((Class) db.getInterface()).to((Class) db.getTarget()).in(Singleton.class);
|
||||
//else
|
||||
this.bind(db.getInterface()).toInstance(db.getTarget());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.kernel.config;
|
||||
|
||||
/**
|
||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
public class DependencyBinding {
|
||||
private final Class intf;
|
||||
private final Object target;
|
||||
|
||||
public DependencyBinding(final Class intf, final Object target) {
|
||||
this.intf = intf;
|
||||
this.target = target;
|
||||
}
|
||||
public Class getInterface() {
|
||||
return intf;
|
||||
}
|
||||
public Object getTarget() {
|
||||
return target;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Copyright (C) 2009 Scalable Solutions.
|
||||
*/
|
||||
|
||||
package se.scalablesolutions.akka.kernel.nio.protobuf;
|
||||
|
||||
/*
|
||||
Compile with:
|
||||
cd ./util-java/src/main/java
|
||||
protoc se/scalablesolutions/akka/kernel/nio/protobuf/RemoteProtocol.proto --java_out .
|
||||
*/
|
||||
|
||||
option optimize_for = SPEED;
|
||||
|
||||
message RemoteRequest {
|
||||
required uint64 id = 1;
|
||||
required uint32 protocol = 2;
|
||||
required bytes message = 3;
|
||||
optional bytes messageManifest = 4;
|
||||
optional string method = 5;
|
||||
required string target = 6;
|
||||
required uint64 timeout = 7;
|
||||
optional string supervisorUuid = 8;
|
||||
required bool isActor = 9;
|
||||
required bool isOneWay = 10;
|
||||
required bool isEscaped = 11;
|
||||
}
|
||||
|
||||
message RemoteReply {
|
||||
required uint64 id = 1;
|
||||
optional uint32 protocol = 2;
|
||||
optional bytes message = 3;
|
||||
optional bytes messageManifest = 4;
|
||||
optional string exception = 5;
|
||||
optional string supervisorUuid = 6;
|
||||
required bool isActor = 7;
|
||||
required bool isSuccessful = 8;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue