[Git][java-team/disruptor][master] 9 commits: New upstream version 3.4.4

Tony Mancill (@tmancill) gitlab at salsa.debian.org
Sun Aug 15 23:59:12 BST 2021



Tony Mancill pushed to branch master at Debian Java Maintainers / disruptor


Commits:
0cd2c932 by tony mancill at 2021-08-15T14:57:07-07:00
New upstream version 3.4.4
- - - - -
6cc86d28 by tony mancill at 2021-08-15T14:57:07-07:00
Use debhelper-compat 13

- - - - -
dc1d9933 by tony mancill at 2021-08-15T14:57:07-07:00
Set Rules-Requires-Root: no in debian/control

- - - - -
562e0153 by tony mancill at 2021-08-15T15:15:04-07:00
Update get-orig-pom target to use search.maven.org

- - - - -
0b11166d by tony mancill at 2021-08-15T15:15:35-07:00
Update pom for upstream version 3.4.4

- - - - -
9ebe0199 by tony mancill at 2021-08-15T15:15:53-07:00
Bump Standards-Version to 4.5.1

- - - - -
c812b9ee by tony mancill at 2021-08-15T15:16:12-07:00
Freshen debian/copyright

- - - - -
1ee7f7b4 by tony mancill at 2021-08-15T15:52:13-07:00
Use pkg-info.mk instead of parsing version via dpkg-parsechangelog

- - - - -
93be9d0b by tony mancill at 2021-08-15T15:52:43-07:00
Prepare changelog for upload to unstable

- - - - -


11 changed files:

- README.md
- build.gradle
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- debian/pom.xml
- debian/rules
- src/main/java/com/lmax/disruptor/BatchEventProcessor.java
- + src/main/java/com/lmax/disruptor/ExceptionHandlers.java
- src/main/java/com/lmax/disruptor/dsl/ExceptionHandlerWrapper.java


Changes:

=====================================
README.md
=====================================
@@ -4,9 +4,7 @@ A High Performance Inter-Thread Messaging Library
 
 ## Maintainer
 
-[Michael Barker](https://github.com/mikeb01)
-
-[![Build Status](https://semaphoreci.com/api/v1/mikeb01/disruptor/branches/master/badge.svg)](https://semaphoreci.com/mikeb01/disruptor)
+LMAX Development Team
 
 ## Documentation
 
@@ -15,6 +13,14 @@ A High Performance Inter-Thread Messaging Library
 
 ## Changelog
 
+### 3.4.4
+
+- Lazy-loading of Logger instances
+
+### 3.4.3
+
+- Add Automatic-Module-Name to MANIFEST.MF
+
 ### 3.4.2
 
 - Fix race condition in BatchEventProcessor with 3 or more starting/halting concurrently.


=====================================
build.gradle
=====================================
@@ -24,7 +24,7 @@ apply plugin: 'idea'
 defaultTasks 'build'
 
 group = 'com.lmax'
-version = new Version(major: 3, minor: 4, revision: 2)
+version = new Version(major: 3, minor: 4, revision: 4)
 
 ext {
     fullName = 'Disruptor Framework'
@@ -32,6 +32,7 @@ ext {
     teamName = 'LMAX Disruptor Development Team'
     siteUrl = 'http://lmax-exchange.github.com/disruptor'
     sourceUrl = 'git at github.com:LMAX-Exchange/disruptor.git'
+    moduleName = 'com.lmax.disruptor'
 
     javaCompilerExecutable = System.env['JAVA_HOME'] ? System.env['JAVA_HOME'] + '/bin/javac' : 'javac'
 
@@ -99,7 +100,8 @@ jar {
                         'Bundle-Name': fullName,
                         'Bundle-Vendor': teamName,
                         'Bundle-Description': fullDescription,
-                        'Bundle-DocURL': siteUrl)
+                        'Bundle-DocURL': siteUrl,
+                        'Automatic-Module-Name': moduleName)
 }
 
 task sourcesJar(type: Jar) {


=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+disruptor (3.4.4-1) unstable; urgency=medium
+
+  * New upstream version 3.4.4
+  * Use debhelper-compat 13
+  * Set Rules-Requires-Root: no in debian/control
+  * Update get-orig-pom target to use search.maven.org
+  * Bump Standards-Version to 4.5.1
+  * Freshen debian/copyright
+  * Use pkg-info.mk instead of parsing version via dpkg-parsechangelog
+
+ -- tony mancill <tmancill at debian.org>  Sun, 15 Aug 2021 15:48:58 -0700
+
 disruptor (3.4.2-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11


=====================================
debian/control
=====================================
@@ -4,11 +4,15 @@ Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Emmanuel Bourg <ebourg at apache.org>,
  tony mancill <tmancill at debian.org>
-Build-Depends: debhelper (>= 11), default-jdk, maven-debian-helper (>= 1.5), junit4
-Standards-Version: 4.2.1
+Build-Depends: debhelper-compat (= 13),
+               default-jdk,
+               junit4,
+               maven-debian-helper (>= 1.5)
+Standards-Version: 4.5.1
 Vcs-Git: https://salsa.debian.org/java-team/disruptor.git
 Vcs-Browser: https://salsa.debian.org/java-team/disruptor
 Homepage: https://github.com/LMAX-Exchange/disruptor/wiki
+Rules-Requires-Root: no
 
 Package: libdisruptor-java
 Architecture: all


=====================================
debian/copyright
=====================================
@@ -5,12 +5,12 @@ Source: http://lmax-exchange.github.com/disruptor
 Files-Excluded: gradle lib gradlew gradlew.bat
 
 Files: *
-Copyright: 2011-2018, LMAX Ltd
+Copyright: 2011-2021, LMAX Ltd
 License: Apache-2.0
 
 Files: debian/*
-Copyright: 2014-2018, Emmanuel Bourg <ebourg at apache.org>
-           2016-2018, tony mancill <tmancill at debian.org>
+Copyright: 2014-2021, Emmanuel Bourg <ebourg at apache.org>
+           2016-2021, tony mancill <tmancill at debian.org>
 License: Apache-2.0
 
 License: Apache-2.0


=====================================
debian/pom.xml
=====================================
@@ -4,7 +4,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.lmax</groupId>
   <artifactId>disruptor</artifactId>
-  <version>3.4.2</version>
+  <version>3.4.4</version>
   <name>Disruptor Framework</name>
   <description>Disruptor - Concurrent Programming Framework</description>
   <url>http://lmax-exchange.github.com/disruptor</url>


=====================================
debian/rules
=====================================
@@ -1,7 +1,8 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/pkg-info.mk
+
 export JAVA_HOME = /usr/lib/jvm/default-java
-export VERSION   = $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p')
 
 %:
 	dh $@ --buildsystem=maven
@@ -18,4 +19,4 @@ override_dh_clean:
 	rm -f pom.xml
 
 get-orig-pom:
-	wget http://central.maven.org/maven2/com/lmax/disruptor/$(VERSION)/disruptor-$(VERSION).pom -O debian/pom.xml
+	wget https://search.maven.org/remotecontent?filepath=com/lmax/disruptor/$(DEB_VERSION_UPSTREAM)/disruptor-$(DEB_VERSION_UPSTREAM).pom -O debian/pom.xml


=====================================
src/main/java/com/lmax/disruptor/BatchEventProcessor.java
=====================================
@@ -35,7 +35,7 @@ public final class BatchEventProcessor<T>
     private static final int RUNNING = HALTED + 1;
 
     private final AtomicInteger running = new AtomicInteger(IDLE);
-    private ExceptionHandler<? super T> exceptionHandler = new FatalExceptionHandler();
+    private ExceptionHandler<? super T> exceptionHandler;
     private final DataProvider<T> dataProvider;
     private final SequenceBarrier sequenceBarrier;
     private final EventHandler<? super T> eventHandler;
@@ -184,7 +184,7 @@ public final class BatchEventProcessor<T>
             }
             catch (final Throwable ex)
             {
-                exceptionHandler.handleEventException(ex, nextSequence, event);
+                handleEventException(ex, nextSequence, event);
                 sequence.set(nextSequence);
                 nextSequence++;
             }
@@ -208,7 +208,7 @@ public final class BatchEventProcessor<T>
         }
         catch (Throwable e)
         {
-            exceptionHandler.handleEventException(e, availableSequence, null);
+            handleEventException(e, availableSequence, null);
         }
     }
 
@@ -225,7 +225,7 @@ public final class BatchEventProcessor<T>
             }
             catch (final Throwable ex)
             {
-                exceptionHandler.handleOnStartException(ex);
+                handleOnStartException(ex);
             }
         }
     }
@@ -243,8 +243,45 @@ public final class BatchEventProcessor<T>
             }
             catch (final Throwable ex)
             {
-                exceptionHandler.handleOnShutdownException(ex);
+                handleOnShutdownException(ex);
             }
         }
     }
+
+    /**
+     * Delegate to {@link ExceptionHandler#handleEventException(Throwable, long, Object)} on the delegate or
+     * the default {@link ExceptionHandler} if one has not been configured.
+     */
+    private void handleEventException(final Throwable ex, final long sequence, final T event)
+    {
+        getExceptionHandler().handleEventException(ex, sequence, event);
+    }
+
+    /**
+     * Delegate to {@link ExceptionHandler#handleOnStartException(Throwable)} on the delegate or
+     * the default {@link ExceptionHandler} if one has not been configured.
+     */
+    private void handleOnStartException(final Throwable ex)
+    {
+        getExceptionHandler().handleOnStartException(ex);
+    }
+
+    /**
+     * Delegate to {@link ExceptionHandler#handleOnShutdownException(Throwable)} on the delegate or
+     * the default {@link ExceptionHandler} if one has not been configured.
+     */
+    private void handleOnShutdownException(final Throwable ex)
+    {
+        getExceptionHandler().handleOnShutdownException(ex);
+    }
+
+    private ExceptionHandler<? super T> getExceptionHandler()
+    {
+        ExceptionHandler<? super T> handler = exceptionHandler;
+        if (handler == null)
+        {
+            return ExceptionHandlers.defaultHandler();
+        }
+        return handler;
+    }
 }
\ No newline at end of file


=====================================
src/main/java/com/lmax/disruptor/ExceptionHandlers.java
=====================================
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2021 LMAX Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.lmax.disruptor;
+
+/** Provides static methods for accessing a default {@link ExceptionHandler} object. */
+public final class ExceptionHandlers
+{
+
+    /**
+     * Get a reference to the default {@link ExceptionHandler} instance.
+     *
+     * @return a reference to the default {@link ExceptionHandler} instance
+     */
+    public static ExceptionHandler<Object> defaultHandler()
+    {
+        return DefaultExceptionHandlerHolder.HANDLER;
+    }
+
+    private ExceptionHandlers()
+    {
+    }
+
+    // lazily initialize the default exception handler.
+    // This nested object isn't strictly necessary unless additional utility functionality is
+    // added to ExceptionHandlers, but it exists to ensure the code remains obvious.
+    private static final class DefaultExceptionHandlerHolder
+    {
+        private static final ExceptionHandler<Object> HANDLER = new FatalExceptionHandler();
+    }
+}


=====================================
src/main/java/com/lmax/disruptor/dsl/ExceptionHandlerWrapper.java
=====================================
@@ -1,11 +1,11 @@
 package com.lmax.disruptor.dsl;
 
 import com.lmax.disruptor.ExceptionHandler;
-import com.lmax.disruptor.FatalExceptionHandler;
+import com.lmax.disruptor.ExceptionHandlers;
 
 public class ExceptionHandlerWrapper<T> implements ExceptionHandler<T>
 {
-    private ExceptionHandler<? super T> delegate = new FatalExceptionHandler();
+    private ExceptionHandler<? super T> delegate;
 
     public void switchTo(final ExceptionHandler<? super T> exceptionHandler)
     {
@@ -15,18 +15,28 @@ public class ExceptionHandlerWrapper<T> implements ExceptionHandler<T>
     @Override
     public void handleEventException(final Throwable ex, final long sequence, final T event)
     {
-        delegate.handleEventException(ex, sequence, event);
+        getExceptionHandler().handleEventException(ex, sequence, event);
     }
 
     @Override
     public void handleOnStartException(final Throwable ex)
     {
-        delegate.handleOnStartException(ex);
+        getExceptionHandler().handleOnStartException(ex);
     }
 
     @Override
     public void handleOnShutdownException(final Throwable ex)
     {
-        delegate.handleOnShutdownException(ex);
+        getExceptionHandler() .handleOnShutdownException(ex);
+    }
+
+    private ExceptionHandler<? super T> getExceptionHandler()
+    {
+        ExceptionHandler<? super T> handler = delegate;
+        if (handler == null)
+        {
+            return ExceptionHandlers.defaultHandler();
+        }
+        return handler;
     }
 }



View it on GitLab: https://salsa.debian.org/java-team/disruptor/-/compare/a78e08d369e984bebcd7903253ec23f4b4b348c6...93be9d0be17601d16e2cf0d35d3d35d3a06cbd9e

-- 
View it on GitLab: https://salsa.debian.org/java-team/disruptor/-/compare/a78e08d369e984bebcd7903253ec23f4b4b348c6...93be9d0be17601d16e2cf0d35d3d35d3a06cbd9e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20210815/5042157c/attachment.htm>


More information about the pkg-java-commits mailing list