Javadoc fixes
[jabaws.git] / engine / compbio / engine / cluster / dundee / _Queue.java
index c0fbb0b..3ee2e0a 100644 (file)
  * must include this copyright and license notice.\r
  */\r
 package compbio.engine.cluster.dundee;\r
-import static compbio.engine.cluster.dundee._QueueConstraints.*;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.FIRST_MEMORY_LIMIT;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.LONG_TIME_LIMIT;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.MAX_MEMORY_LIMIT;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.SHORT_TIME_LIMIT;\r
 \r
+@Deprecated\r
 public enum _Queue {\r
 \r
        /*\r
-        * devel.q          4Gb or 16Gb          8 hour  I\r
-          64bit-pri.q  4Gb or 16Gb     24 hours        B\r
-       64bit.q         4Gb or 16Gb     None    B\r
-       bigint.q        32Gb            8 h     I\r
-       bigmem.q        32Gb            None    B \r
+        * devel.q 4Gb or 16Gb 8 hour I 64bit-pri.q 4Gb or 16Gb 24 hours B 64bit.q\r
+        * 4Gb or 16Gb None B bigint.q 32Gb 8 h I bigmem.q 32Gb None B\r
         */\r
 \r
        /**\r
         * Order of the constraint reflect the priority of the queue\r
         */\r
-       DEVEL(FIRST_MEMORY_LIMIT, SHORT_TIME_LIMIT,"devel.q"), \r
-       PRIBIT64(FIRST_MEMORY_LIMIT,LONG_TIME_LIMIT,"64bit-pri.q"), \r
-       BIT64(FIRST_MEMORY_LIMIT,0,"64bit.q"), \r
-       BIGINT(MAX_MEMORY_LIMIT,SHORT_TIME_LIMIT,"bigint.q"), \r
-       BIGMEM(MAX_MEMORY_LIMIT,0,"bigmem.q");\r
-       \r
-       \r
+       DEVEL(FIRST_MEMORY_LIMIT, SHORT_TIME_LIMIT, "devel.q"), PRIBIT64(\r
+                       FIRST_MEMORY_LIMIT, LONG_TIME_LIMIT, "64bit-pri.q"), BIT64(\r
+                       FIRST_MEMORY_LIMIT, 0, "64bit.q"), BIGINT(MAX_MEMORY_LIMIT,\r
+                       SHORT_TIME_LIMIT, "bigint.q"), BIGMEM(MAX_MEMORY_LIMIT, 0,\r
+                       "bigmem.q");\r
+\r
        int maxMemory;\r
        int maxRuntime;\r
        String qname;\r
        private _Queue(int maxMemory, int maxRuntime, String qname) {\r
-               this.maxMemory=maxMemory;\r
-               this.maxRuntime=maxRuntime;\r
-               this.qname = qname; \r
+               this.maxMemory = maxMemory;\r
+               this.maxRuntime = maxRuntime;\r
+               this.qname = qname;\r
        }\r
-       \r
+\r
        // -q 64bit.q -l qname=64bit.q -l h_vmem=8000M -l ram=8000M\r
        @Override\r
        public String toString() {\r
@@ -55,92 +55,98 @@ public enum _Queue {
 \r
        /**\r
         * 0 - unlimited\r
+        * \r
         * @return max runtime in hours\r
         */\r
-       public int getTimeLimit() { \r
+       public int getTimeLimit() {\r
                return this.maxRuntime;\r
        }\r
-       \r
+\r
        /**\r
         * \r
-        * @return true if the queue has time limit, false overwise \r
+        * @return true if the queue has time limit, false overwise\r
         */\r
-       public boolean hasTimeLimit()  { \r
-               return this.maxRuntime != 0; \r
+       public boolean hasTimeLimit() {\r
+               return this.maxRuntime != 0;\r
        }\r
        /**\r
         * return max memory limit in Mb\r
+        * \r
         * @return\r
         */\r
-       public int getMemoryLimit() { \r
+       public int getMemoryLimit() {\r
                return this.maxMemory;\r
        }\r
-       \r
-       public static _Queue getQueueByMemoryRequirements(int maxMemory) { \r
-               if(maxMemory>FIRST_MEMORY_LIMIT) {\r
+\r
+       public static _Queue getQueueByMemoryRequirements(int maxMemory) {\r
+               if (maxMemory > FIRST_MEMORY_LIMIT) {\r
                        return BIGMEM;\r
-               } else if(maxMemory<MAX_MEMORY_LIMIT)\r
-                       return BIT64; \r
-               else { \r
-                       throw new UnsupportedOperationException("Cluster does not support tasks requiring more than 30000M of memory");\r
+               } else if (maxMemory < MAX_MEMORY_LIMIT)\r
+                       return BIT64;\r
+               else {\r
+                       throw new UnsupportedOperationException(\r
+                                       "Cluster does not support tasks requiring more than 30000M of memory");\r
                }\r
        }\r
 \r
-       public static _Queue getQueue(int maxMemory, int timeLimitInHours) { \r
-               if(timeLimitInHours==0) { \r
+       public static _Queue getQueue(int maxMemory, int timeLimitInHours) {\r
+               if (timeLimitInHours == 0) {\r
                        return getQueueByMemoryRequirements(maxMemory);\r
-               } else { \r
-                       if(timeLimitInHours<=SHORT_TIME_LIMIT) { \r
-                               if(maxMemory<=FIRST_MEMORY_LIMIT) { \r
+               } else {\r
+                       if (timeLimitInHours <= SHORT_TIME_LIMIT) {\r
+                               if (maxMemory <= FIRST_MEMORY_LIMIT) {\r
                                        return DEVEL;\r
-                               }else if(maxMemory<=MAX_MEMORY_LIMIT){ \r
+                               } else if (maxMemory <= MAX_MEMORY_LIMIT) {\r
                                        return BIGINT;\r
-                               } else { \r
-                                       throw new UnsupportedOperationException("Cluster does not support tasks requiring more than 30000M of memory");\r
+                               } else {\r
+                                       throw new UnsupportedOperationException(\r
+                                                       "Cluster does not support tasks requiring more than 30000M of memory");\r
                                }\r
-                       } else { \r
+                       } else {\r
                                // timeLimit > 8\r
-                               if(timeLimitInHours <= LONG_TIME_LIMIT && maxMemory <=FIRST_MEMORY_LIMIT) { \r
-                                       return PRIBIT64; \r
-                               } else if( maxMemory<= MAX_MEMORY_LIMIT){ \r
+                               if (timeLimitInHours <= LONG_TIME_LIMIT\r
+                                               && maxMemory <= FIRST_MEMORY_LIMIT) {\r
+                                       return PRIBIT64;\r
+                               } else if (maxMemory <= MAX_MEMORY_LIMIT) {\r
                                        return BIGMEM;\r
-                               } else { \r
-                                       throw new UnsupportedOperationException("Cluster does not support tasks requiring more than 30000M of memory");\r
+                               } else {\r
+                                       throw new UnsupportedOperationException(\r
+                                                       "Cluster does not support tasks requiring more than 30000M of memory");\r
                                }\r
                        }\r
                }\r
        }\r
-       \r
-       public _Queue getQueue(String queueName) { \r
-               switch(this) { \r
-               case DEVEL: \r
-                       if ( queueName.equals(DEVEL.toString())) {  \r
-                               return DEVEL;\r
-                       }\r
-                       break;\r
-               case PRIBIT64: \r
-                       if ( queueName.equals(PRIBIT64.toString())) {  \r
-                               return PRIBIT64;\r
-                       }\r
-                       break;\r
-               case BIT64: \r
-                       if ( queueName.equals(BIT64.toString())) {  \r
-                               return BIT64;\r
-                       }\r
-                       break;\r
-               case BIGMEM: \r
-                       if ( queueName.equals(BIGMEM.toString())) {  \r
-                               return BIGMEM;\r
-                       }\r
-                       break;\r
-               case BIGINT: \r
-                       if ( queueName.equals(BIGINT.toString())) {  \r
-                               return BIGINT;\r
-                       }\r
-                       break; \r
+\r
+       public _Queue getQueue(String queueName) {\r
+               switch (this) {\r
+                       case DEVEL :\r
+                               if (queueName.equals(DEVEL.toString())) {\r
+                                       return DEVEL;\r
+                               }\r
+                               break;\r
+                       case PRIBIT64 :\r
+                               if (queueName.equals(PRIBIT64.toString())) {\r
+                                       return PRIBIT64;\r
+                               }\r
+                               break;\r
+                       case BIT64 :\r
+                               if (queueName.equals(BIT64.toString())) {\r
+                                       return BIT64;\r
+                               }\r
+                               break;\r
+                       case BIGMEM :\r
+                               if (queueName.equals(BIGMEM.toString())) {\r
+                                       return BIGMEM;\r
+                               }\r
+                               break;\r
+                       case BIGINT :\r
+                               if (queueName.equals(BIGINT.toString())) {\r
+                                       return BIGINT;\r
+                               }\r
+                               break;\r
                }\r
                // such queue appears to be not defined in the system!\r
-               return null; \r
+               return null;\r
        }\r
 \r
 }\r