This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GraphSpec<T> {} | |
class NodeSpec<T> {} | |
class State<T> {} | |
GraphSpec<T> graph = Graphs.compose() | |
.env(env) | |
.dispatcher(dispatcher) | |
.create("bad arg handler", new Consumer<State<Throwable>>(){}) | |
.create("global err handler", new Consumer<State<Throwable>>(){}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ArrayVsListThroughputTests { | |
static long TIMEOUT = 5000; | |
@Test | |
public void testArrayVsListIteration() { | |
int items = 10; | |
String[] strArray = new String[items]; | |
List<String> strList = new ArrayList<String>(); | |
for(int i = 0; i < items; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> mvn package && java -jar target/microbenchmarks.jar ".*MapBenchmarks.*BinarySearch.*" -f 1 -i 10 -wi 10 -r 3 -tu s | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building reactor-benchmark 1.0.0.BUILD-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ reactor-benchmark --- | |
[debug] execute contextualize | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.sample; | |
import org.openjdk.jmh.annotations.*; | |
import org.openjdk.jmh.logic.BlackHole; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
@Measurement(iterations = 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-( spring-xd (master) ):> ./gradlew cleanIdea idea | |
:cleanIdeaModule | |
:cleanIdeaProject | |
:cleanIdea | |
:modules:cleanIdeaModule | |
:modules:cleanIdea | |
:modules.job.filejdbc:cleanIdeaModule | |
:modules.job.filejdbc:cleanLibs | |
:modules.job.filejdbc:cleanIdea | |
:modules.job.ftphdfs:cleanIdeaModule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package reactor.core.fork; | |
import com.gs.collections.api.list.ImmutableList; | |
import com.gs.collections.impl.list.mutable.FastList; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import reactor.core.Environment; | |
import reactor.core.composable.Promise; | |
import reactor.function.Function; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21-May-2014 11:17:31.821 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.checkThreadLocalMapForLeaks The web application [/spring-websocket-portfolio] created a ThreadLocal with key of type [io.netty.channel.ChannelHandlerAdapter$1] (value [io.netty.channel.ChannelHandlerAdapter$1@afed80a]) and a value of type [java.util.WeakHashMap] (value [{class reactor.net.netty.tcp.NettyTcpClient$1=true}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. | |
21-May-2014 11:17:31.821 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.checkThreadLocalMapForLeaks The web application [/spring-websocket-portfolio] created a ThreadLocal with key of type [io.netty.util.internal.ThreadLocalRandom$3] (value [io.netty.util.internal.ThreadLocalRandom$3@37ff8726]) and a value of type [io.netty.util.internal.ThreadLocalRandom] (value [io.netty.util.internal.ThreadLocalRandom@1ce5a4ff]) but f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ _ _____ _____ ___ ___ _____ _ ____ | |
| || |_ _|_ _| _ \ \ \ / / __(_) / / / | |
| __ | | | | | | _/ |\ \/\/ /\__ \_ / / / | |
|_||_| |_| |_| |_| | | \_/\_/ |___(_)_/_/ | |
=====================|_|===================== | |
HTTP and WebSocket interactive shell - version 1.0 | |
(http://localhost:8080/):> get --headers "X-Custom: custom header value" | |
> GET http://localhost:8080/ HTTP/1.1 | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routing { | |
include SpringConfig | |
http { | |
route("/path/to/{resourceId}") to CustomResource | |
} | |
} | |
interface Context extends AbstractMutableMap<String, Object> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void workerOrchestrator() throws InterruptedException { | |
Environment env = new Environment(); | |
Reactor reactor = Reactors.reactor(env, Environment.THREAD_POOL); | |
CountDownLatch latch = new CountDownLatch(2); | |
reactor.on(Selectors.$("worker"), new Consumer() { | |
@Override |