Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashi Ranjan committed Jun 23, 2015
1 parent 4058990 commit 633a023
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Add following arguments to the server
analytics.token | Api analytics token from https://analytics.mashape.com
analytics.socket.min |Minimum number of threads/sockets to opened for connection to analytics server, default is 10
analytics.socket.max | Maximum number of threads/sockets allowed to live in pool, default is 20
analytics.socket.keepalivetime | When the number of threads are greater than the min, this is the maximum time that excess idle threads will wait for new tasks before terminating.
analytics.socket.keepalivetime | When the number of threads are greater than the min, this is the maximum time in second that excess idle threads will wait for new tasks before terminating. Default is 30 seconds.
analytics.queue.size | Size of the queue for holding the tasks of transferring data to analytics server, default is 100
analytics.enabled.flag | Set it true to enable analytics
analytics.environment | Server environment name, default is a empty string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void terminate() {
socket.close();
}
if (context != null) {
context.close();
context.term();
}
}
Expand Down Expand Up @@ -113,5 +114,10 @@ private Creator setCreator() {
creator.setVersion(AGENT_VERSION);
return creator;
}


@Override
protected void finalize() throws Throwable {
this.terminate();
logger.debug("Messanger resources destroyed:"+ this.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void init(FilterConfig config) throws ServletException {
int poolSize = getEnvVarOrDefault(WORKER_QUEUE_COUNT, 100);
int socketPoolMin = getEnvVarOrDefault(SOCKET_POOL_SIZE_MIN, 10);
int socketPoolMax = getEnvVarOrDefault(SOCKET_POOL_SIZE_MAX, 20);
int poolUpdateInterval = getEnvVarOrDefault(SOCKET_POOL_UPDATE_INTERVAL, 5);
int poolUpdateInterval = getEnvVarOrDefault(SOCKET_POOL_UPDATE_INTERVAL, 30);
environment = getEnvironment();
blockingQueue = new LinkedBlockingQueue<Runnable>(poolSize);
worker = new ThreadPoolExecutor(socketPoolMin, socketPoolMax, poolUpdateInterval, TimeUnit.MILLISECONDS, blockingQueue);
Expand Down

0 comments on commit 633a023

Please sign in to comment.