假设我有一个Hazelcast实例在远程机器上运行,并在官方Docker镜像中执行.所以我wolud喜欢看一些数据,Hazelcast的店刚在第一视频喜欢这里.所以我想知道有没有办法从任何CLI实用程序连接到现有的Hazelcast实例来获取数据但没有管理中心?
我正在做一些研究,我需要 Apache Geode 的基准测试,可能与 Redis 或 Hazelcast 进行比较。如果有人能指点我,我将不胜感激。
在 Pivotal 的一次演示中,我看到了一些基准测试,但它们只是在某些未知方面表明“Geode 比 Cassandra 更快”,并且他们承诺发布基准测试,但我找不到它们。
我有三个与Project Reactor有关的问题,下面将问他们。从我拥有的代码开始(它将简化以更容易理解该问题)。
Mono<Integer> doWithSession(Function<String, Mono<Integer>> callback, long timeout) {
return Mono.just("hello")
.compose(monostr -> monostr
.doOnSuccess(str -> System.out.println("Suppose I want to release session here after all")) //(1)
.doOnCancel(() -> System.out.println("cancelled")) //(2)
.then(callback::apply)
.timeoutMillis(timeout, Mono.error(new TimeoutException("Timeout after " + timeout)))
);
}
Run Code Online (Sandbox Code Playgroud)
并测试:
@Test
public void testDoWithSession2() throws Exception {
Function<String, Mono<Integer>> fun1 = str -> Mono.fromCallable(() -> {
System.out.println("do some long timed work");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("work has completed");
return str.length();
});
StepVerifier.create(doWithSession(fun1,1000))
.verifyError(TimeoutException.class); …
Run Code Online (Sandbox Code Playgroud)