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 reactor.core.Environment; | |
import reactor.core.composable.Deferred; | |
import reactor.core.composable.Stream; | |
import reactor.core.composable.spec.Streams; | |
import reactor.function.Consumer; | |
import reactor.function.Function; | |
import reactor.tuple.Tuple2; | |
/** | |
* @author Jon Brisbin |
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
@Controller | |
public class TradeController { | |
@Autowired | |
private ClientComposableRepository clients; | |
@RequestMapping(value = "/{clientId}", method = RequestMethod.POST) | |
@ResponseBody | |
public DeferredResult<String> trade(@PathVariable Long clientId) { | |
final DeferredResult<String> d = new DeferredResult<String>(); |
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
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':data-spring:test'. | |
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) | |
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) | |
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) | |
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) | |
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) | |
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) | |
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) | |
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.j |
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 org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.AnnotationConfigApplicationContext; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.stereotype.Component; | |
import org.springframework.stereotype.Service; | |
import reactor.core.Environment; | |
import reactor.core.Reactor; | |
import reactor.core.spec.Reactors; |
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
// Create a Reactor Environment (1 per JVM). | |
static final Environment env = new Environment(); | |
// Create a Reactor to handle IO events that's backed by a ThreadPoolExecutorDispatcher. | |
// To increase concurrent thread count, copy META-INF/reactor/default.properties from | |
// GitHub repo and put it into your own project, adjusting number of threads from 0 (1 per CPU) | |
// to whatever you want. | |
Reactor ioReactor = Reactors.reactor() | |
.env(env) | |
.dispatcher(Environment.THREAD_POOL) |
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.spring.webmvc; | |
import org.springframework.core.MethodParameter; | |
import org.springframework.web.context.request.NativeWebRequest; | |
import org.springframework.web.context.request.async.DeferredResult; | |
import org.springframework.web.context.request.async.WebAsyncUtils; | |
import org.springframework.web.method.support.HandlerMethodReturnValueHandler; | |
import org.springframework.web.method.support.ModelAndViewContainer; | |
import reactor.core.composable.Promise; | |
import reactor.function.Consumer; |
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
// reactor-fsm: github.com/jbrisbin/reactor-fsm | |
// reactor: github.com/reactor/reactor | |
StateMachine ioMachine = new StateMachine.Spec(). | |
sync(). | |
using('idle', 'wait', 'send-request', 'response-ready'). | |
when('send-request') { prev -> | |
def msg = requests.peek() | |
send(msg) | |
'wait' |
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
// Set a UriTemplateSelector to respond to any events happening on data in the 'test' bucket | |
riak.on(U("/test/{key}"), (Event ev) -> { | |
String key = ev.getHeaders().get("key"); | |
boolean isStore = StoreEvent.class.isInstance(ev); | |
// Only count down on store | |
if (isStore) { | |
latch.countDown(); | |
} | |
}); |
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
Groovyc: Apr 18, 2013 3:57:44 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule | |
WARNING: Module [reactor-groovy-module] - Unable to load extension class [reactor.groovy.ext.ObservableExtensions] | |
Apr 18, 2013 3:57:44 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule | |
WARNING: Module [reactor-groovy-module] - Unable to load extension class [reactor.groovy.ext.LinkableExtensions] | |
Apr 18, 2013 3:57:44 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule | |
WARNING: Module [reactor-groovy-module] - Unable to load extension class [reactor.groovy.ext.PromiseExtensions] | |
Apr 18, 2013 3:57:44 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule | |
WARNING: Module [reactor-groovy-module] - Unable to load extension class [reactor.groovy.ext.ReactorStaticExtensions] | |
java.lang.StackOverflowError | |
at sun.nio.cs.UTF_8$Decoder.decodeArrayLoop(UTF_8.java:201) |
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
org.neo4j.graphdb.NotInTransactionException | |
at org.neo4j.kernel.impl.index.IndexConnectionBroker.acquireResourceConnection(IndexConnectionBroker.java:49) | |
at org.neo4j.index.impl.lucene.LuceneIndex.getConnection(LuceneIndex.java:85) | |
at org.neo4j.index.impl.lucene.LuceneIndex.remove(LuceneIndex.java:196) | |
at org.springframework.data.neo4j.support.typerepresentation.AbstractIndexingTypeRepresentationStrategy.remove(AbstractIndexingTypeRepresentationStrategy.java:91) | |
at org.springframework.data.neo4j.support.typerepresentation.AbstractIndexingTypeRepresentationStrategy.preEntityRemoval(AbstractIndexingTypeRepresentationStrategy.java:86) | |
at org.springframework.data.neo4j.support.mapping.EntityRemover.removeNode(EntityRemover.java:49) | |
at org.springframework.data.neo4j.support.mapping.EntityRemover.removeNodeEntity(EntityRemover.java:45) | |
at org.springframework.data.neo4j.support.mapping.EntityRemover.remove(EntityRemover.java:85) | |
at org.springframework.data.neo4j.support.Neo4jTemplate.delete(Neo4jTemplate.j |