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
2013-12-18 12:30:40.697 ERROR 26191 --- [nio-8080-exec-5] .m.m.a.ExceptionHandlerExceptionResolver : Failed to invoke @ExceptionHandler method: public org.springframework.http.ResponseEntity<org.springframework.data.rest.webmvc.support.ExceptionMessage> org.springframework.data.rest.webmvc.AbstractRepositoryRestController.handleNotReadable(org.springframework.http.converter.HttpMessageNotReadableException) | |
java.lang.IllegalStateException: No suitable resolver for argument [0] [type=org.springframework.http.converter.HttpMessageNotReadableException] | |
HandlerMethod details: | |
Controller [org.springframework.data.rest.webmvc.RepositoryEntityController] | |
Method [public org.springframework.http.ResponseEntity<org.springframework.data.rest.webmvc.support.ExceptionMessage> org.springframework.data.rest.webmvc.AbstractRepositoryRestController.handleNotReadable(org.springframework.http.converter.HttpMessageNotReadableException)] | |
at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(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
package com.couchbase.bootcache; | |
import com.couchbase.client.CouchbaseClient; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.ComponentScan.Filter; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.Import; | |
import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration; |
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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile group: 'net.spy', name:'spymemcached', version: '2.10.3' | |
} |
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
apply plugin: 'checkstyle' | |
checkstyleMain { | |
ignoreFailures = false | |
reports { | |
include ( '**/*.java') | |
xml { | |
destination "${rootProject.buildDir}/reports/checkstyle/main.xml" | |
} | |
} |
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
/** | |
* Copyright (C) 2009-2013 Couchbase, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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 io.netty.jmh.buffer; | |
import io.netty.buffer.ByteBuf; | |
import io.netty.buffer.ByteBufAllocator; | |
import io.netty.buffer.PooledByteBufAllocator; | |
import io.netty.buffer.UnpooledByteBufAllocator; | |
import io.netty.jmh.util.AbstractMicrobenchmark; | |
import org.openjdk.jmh.annotations.GenerateMicroBenchmark; | |
import org.openjdk.jmh.annotations.State; |
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
use std::io::net::tcp::TcpListener; | |
use std::io::{Listener, Acceptor}; | |
use std::io::net::ip::{SocketAddr, Ipv4Addr}; | |
fn main() { | |
let listen_socket = SocketAddr { | |
ip: Ipv4Addr(127, 0, 0, 1), | |
port: 9999 | |
}; |
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
import com.couchbase.client.CouchbaseClient; | |
import com.couchbase.client.internal.HttpCompletionListener; | |
import com.couchbase.client.internal.HttpFuture; | |
import com.couchbase.client.internal.ViewFuture; | |
import com.couchbase.client.protocol.views.*; | |
import net.spy.memcached.internal.OperationFuture; | |
import net.spy.memcached.ops.Mutator; | |
import net.spy.memcached.ops.Operation; | |
import net.spy.memcached.ops.OperationCallback; | |
import net.spy.memcached.ops.OperationStatus; |
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 Promise<String> load() { | |
final Deferred<String,Promise<String>> deferred = Promises.defer(env.reactorEnv()); | |
addNode().consume(new Consumer<Boolean>() { | |
@Override | |
public void accept(Boolean success) { | |
if(success) { | |
addService().consume(new Consumer<Boolean>() { | |
@Override | |
public void accept(Boolean success) { |
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
addNode().mapMany(new Function<Boolean, Composable<Boolean>>() { | |
@Override | |
public Composable<Boolean> apply(Boolean success) { | |
return addService(); | |
} | |
}).mapMany(new Function<Boolean, Composable<String>>() { | |
@Override | |
public Composable<String> apply(Boolean success) { | |
return loadRawConfig(); | |
} |