geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1365015 - /geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
Date Tue, 24 Jul 2012 12:48:57 GMT
Author: gnodet
Date: Tue Jul 24 12:48:56 2012
New Revision: 1365015

URL: http://svn.apache.org/viewvc?rev=1365015&view=rev
Log:
GERONIMO-6373: Expose HOWL flushPartialBuffer config via HOWLLog - useful under low concurrency

Modified:
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java?rev=1365015&r1=1365014&r2=1365015&view=diff
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
(original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/log/HOWLLog.java
Tue Jul 24 12:48:56 2012
@@ -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 class HOWLLog implements Transact
                    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 class HOWLLog implements Transact
         setMaxLogFiles(maxLogFiles);
         setMinBuffers(minBuffers);
         setThreadsWaitingForceThreshold(threadsWaitingForceThreshold);
+        setFlushPartialBuffers(flushPartialBuffers);
         this.xidFactory = xidFactory;
         this.logger = new XALogger(configuration);
     }
@@ -215,6 +241,14 @@ public class HOWLLog implements Transact
         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);



Mime
View raw message