This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
import static reactor.event.selector.Selectors.*; | |
import reactor.core.Environment; | |
import reactor.core.Reactor; | |
import reactor.core.spec.Reactors; | |
import reactor.event.Event; | |
import reactor.function.Function; | |
/** | |
* Example of Reactor usage with JDK 8 Lambdas. |
This file contains hidden or 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 NettyHttpServerSocketOptions extends NettyServerSocketOptions { | |
@Override | |
public final Consumer<ChannelPipeline> pipelineConfigurer() { | |
return new Consumer<ChannelPipeline>() { | |
@Override | |
public void accept(ChannelPipeline pipeline) { | |
pipeline.addLast(new HttpRequestDecoder()); | |
pipeline.addLast(new HttpObjectAggregator(Integer.MAX_VALUE)); | |
pipeline.addLast(new HttpResponseEncoder()); | |
} |
This file contains hidden or 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 interface ComposableEventRepository<V, K extends Serializable> extends ComposableMessagingRepository<Event<V>, K> { | |
Stream<Event<V>> receive(Selector sel); | |
} |