onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r1606437 - /onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/DefaultStager.java
Date Sun, 29 Jun 2014 06:44:13 GMT
Author: ash2k
Date: Sun Jun 29 06:44:13 2014
New Revision: 1606437

URL: http://svn.apache.org/r1606437
Log:
ArrayDeque is faster than LinkedList per it's JavaDoc

Modified:
    onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/DefaultStager.java

Modified: onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/DefaultStager.java
URL: http://svn.apache.org/viewvc/onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/DefaultStager.java?rev=1606437&r1=1606436&r2=1606437&view=diff
==============================================================================
--- onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/DefaultStager.java
(original)
+++ onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/DefaultStager.java
Sun Jun 29 06:44:13 2014
@@ -21,8 +21,8 @@ package org.apache.onami.lifecycle.core;
 
 import java.io.Closeable;
 import java.lang.annotation.Annotation;
+import java.util.ArrayDeque;
 import java.util.Collections;
-import java.util.LinkedList;
 import java.util.Queue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
@@ -61,13 +61,13 @@ public class DefaultStager<A extends Ann
         {
             case FIRST_IN_FIRST_OUT:
             {
-                localStageables = new LinkedList<Stageable>();
+                localStageables = new ArrayDeque<Stageable>();
                 break;
             }
 
             case FIRST_IN_LAST_OUT:
             {
-                localStageables = Collections.asLifoQueue( new LinkedList<Stageable>()
);
+                localStageables = Collections.asLifoQueue( new ArrayDeque<Stageable>()
);
                 break;
             }
 



Mime
View raw message