Skip to content
Permalink
Browse files
GERONIMO-6373: Expose HOWL flushPartialBuffer config via HOWLLog - us…
…eful under low concurrency

git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/txmanager/trunk@1365015 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
gnodet committed Jul 24, 2012
1 parent d21f394 commit bbaaabb9c7222a8c6e2b51305a42dc37066bbf72
Showing 1 changed file with 36 additions and 2 deletions.
@@ -17,11 +17,10 @@

package org.apache.geronimo.transaction.log;

import java.io.IOException;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.transaction.xa.Xid;
@@ -84,6 +83,32 @@ public HOWLLog(String bufferClassName,
int threadsWaitingForceThreshold,
XidFactory xidFactory,
File serverBaseDir) throws IOException, LogConfigurationException {
this(bufferClassName, bufferSize,
checksumEnabled, adler32Checksum,
flushSleepTimeMilliseconds, logFileDir,
logFileExt, logFileName,
maxBlocksPerFile, maxBuffers,
maxLogFiles, minBuffers,
threadsWaitingForceThreshold, true,
xidFactory, serverBaseDir);
}

public HOWLLog(String bufferClassName,
int bufferSize,
boolean checksumEnabled,
boolean adler32Checksum,
int flushSleepTimeMilliseconds,
String logFileDir,
String logFileExt,
String logFileName,
int maxBlocksPerFile,
int maxBuffers,
int maxLogFiles,
int minBuffers,
int threadsWaitingForceThreshold,
boolean flushPartialBuffers,
XidFactory xidFactory,
File serverBaseDir) throws IOException, LogConfigurationException {
this.serverBaseDir = serverBaseDir;
setBufferClassName(bufferClassName);
setBufferSizeKBytes(bufferSize);
@@ -99,6 +124,7 @@ public HOWLLog(String bufferClassName,
setMaxLogFiles(maxLogFiles);
setMinBuffers(minBuffers);
setThreadsWaitingForceThreshold(threadsWaitingForceThreshold);
setFlushPartialBuffers(flushPartialBuffers);
this.xidFactory = xidFactory;
this.logger = new XALogger(configuration);
}
@@ -215,6 +241,14 @@ public void setMaxLogFiles(int maxLogFiles) {
configuration.setMaxLogFiles(maxLogFiles);
}

public boolean isFlushPartialBuffers() {
return configuration.isFlushPartialBuffers();
}

public void setFlushPartialBuffers(boolean flushPartialBuffers) {
configuration.setFlushPartialBuffers(flushPartialBuffers);
}

public void doStart() throws Exception {
started = true;
setLogFileDir(logFileDir);

0 comments on commit bbaaabb

Please sign in to comment.