Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/otrack/infinispan-aof
Browse files Browse the repository at this point in the history
  • Loading branch information
otrack committed Jun 7, 2018
2 parents 97d990c + 6f53fd3 commit be7eb72
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public final Object getProxy(){
public abstract void doExecute(Call call);

protected Object execute(Call call)
throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException {
throws Throwable {

if (log.isTraceEnabled())
log.trace(this + " Executing "+call);
Expand All @@ -72,8 +72,8 @@ protected Object execute(Call call)
attempts++;
doExecute(call);
ret = future.get(TTIMEOUT_TIME, TimeUnit.MILLISECONDS);
if (ret instanceof Throwable)
throw new ExecutionException((Throwable) ret);
// if (ret instanceof Throwable)
// throw new ExecutionException((Throwable) ret);
}catch (TimeoutException e) {
if (!future.isDone())
log.warn(" Failed "+ call + " ("+e.getMessage()+")");
Expand All @@ -83,6 +83,9 @@ protected Object execute(Call call)
}
Thread.sleep(TTIMEOUT_TIME);
}
if (ret instanceof Throwable)
throw ((Throwable) ret).getCause();

}

registeredCalls.remove(call.getCallID());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public String toString() {
// internals

private synchronized void open()
throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException {
throws Throwable {

if (!isOpen) {

Expand Down
2 changes: 1 addition & 1 deletion server/src/main/bin/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CLASSPATH="${DIR}/*:${DIR}/lib/*"
IP="0.0.0.0"
JVM="-XX:+UseConcMarkSweepGC -Xms64m -Xmx1024m -Djava.net.preferIPv4Stack=true -Djgroups.tcp.address=${IP} -Dlog4j.configurationFile=${DIR}/log4j2.xml"
EXTRA="-rf 1"

if [ "$1" == "-ec2" ];
Expand All @@ -14,4 +13,5 @@ then
EXTRA="-proxy ${PIP}:11222 -ec2 -rf 2"
fi

JVM="-XX:+UseConcMarkSweepGC -Xms64m -Xmx1024m -Djava.net.preferIPv4Stack=true -Djgroups.tcp.address=${IP} -Dlog4j.configurationFile=${DIR}/log4j2.xml"
java -cp ${CLASSPATH} ${JVM} org.infinispan.creson.Server -server ${IP}:11222 ${EXTRA}
5 changes: 4 additions & 1 deletion server/src/main/java/org/infinispan/creson/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public class Server {
@Option(name = "-userLibs", usage = "directory containing the user libraries")
private String userLib = userLibraries;

@Option(name = "-wt", usage = "number of HotRod worker threads")
private int workerThreads = 100;

private volatile boolean running = false;

public Server() {
Expand Down Expand Up @@ -145,7 +148,7 @@ public void doMain(String[] args) {
hbuilder.proxyPort(proxyPort);
}

hbuilder.workerThreads(100);
hbuilder.workerThreads(workerThreads);
hbuilder.tcpNoDelay(true);

final HotRodServer server = new HotRodServer();
Expand Down

0 comments on commit be7eb72

Please sign in to comment.