From 0268cb59fc7d74cea93f8308fa7a8fd96b7a872d Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Wed, 11 Nov 2009 06:29:38 +0000 Subject: [PATCH] Issue 118: removed JDK 5 and rolled concurrent into core git-svn-id: http://jclouds.googlecode.com/svn/trunk@2248 3d8758e0-26b5-11de-8745-db77d3ebf521 --- concurrent/pom.xml | 112 ------------------ .../main/java/org/jclouds/logging/Logger.java | 89 -------------- .../java/org/jclouds/logging/NullLogger.java | 93 --------------- core/pom.xml | 55 ++++----- .../concurrent/FutureExceptionParser.java | 0 .../concurrent/FutureFunctionCallable.java | 0 .../concurrent/FutureFunctionWrapper.java | 0 .../concurrent/RunnableFutureTask.java | 0 .../concurrent/SingleThreadCompatible.java | 0 .../jclouds/concurrent/SingleThreaded.java | 0 .../concurrent/WithinThreadExecutor.java | 0 .../WithinThreadExecutorService.java | 0 .../concurrent/FutureExceptionParserTest.java | 0 project/pom.xml | 10 +- twitter/pom.xml | 2 +- 15 files changed, 28 insertions(+), 333 deletions(-) delete mode 100755 concurrent/pom.xml delete mode 100755 concurrent/src/main/java/org/jclouds/logging/Logger.java delete mode 100755 concurrent/src/main/java/org/jclouds/logging/NullLogger.java rename {concurrent => core}/src/main/java/org/jclouds/concurrent/FutureExceptionParser.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/FutureFunctionCallable.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/FutureFunctionWrapper.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/RunnableFutureTask.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/SingleThreadCompatible.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/SingleThreaded.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/WithinThreadExecutor.java (100%) rename {concurrent => core}/src/main/java/org/jclouds/concurrent/WithinThreadExecutorService.java (100%) rename {concurrent => core}/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java (100%) diff --git a/concurrent/pom.xml b/concurrent/pom.xml deleted file mode 100755 index b2b6bb75e8..0000000000 --- a/concurrent/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - jclouds-project - org.jclouds - 1.0-SNAPSHOT - ../project/pom.xml - - 4.0.0 - jclouds-concurrent - jclouds concurrent - jar - Core components to access jclouds services - - - scm:svn:http://jclouds.googlecode.com/svn/trunk/concurrent - scm:svn:https://jclouds.googlecode.com/svn/trunk/concurrent - http://jclouds.googlecode.com/svn/trunk/concurrent - - - - - - - - - com.google.collections - google-collections - 1.0-rc2 - - - - - - - compilejdk6executors - - 1.5 - - - - - maven-dependency-plugin - - - process-resources - - copy - - - - - java.concurrent - jdk6-exec - 6.18 - ${project.build.directory}/endorsed - - - - - - - - maven-compiler-plugin - - -Djava.endorsed.dirs=${project.build.directory}/endorsed - true - - - - maven-surefire-plugin - - -Djava.endorsed.dirs=${project.build.directory}/endorsed - - - listener - - - - - - - - - - diff --git a/concurrent/src/main/java/org/jclouds/logging/Logger.java b/concurrent/src/main/java/org/jclouds/logging/Logger.java deleted file mode 100755 index 125cb8df78..0000000000 --- a/concurrent/src/main/java/org/jclouds/logging/Logger.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * - * Copyright (C) 2009 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 org.jclouds.logging; - -/** - * JCloud log abstraction layer. - *

- * Implementations of logging are optional and injected if they are configured. - *

- * @Resource Logger logger = Logger.NULL; The above will get you a - * null-safe instance of Logger. If configured, this logger will be - * swapped with a real Logger implementation with category set to the current - * class name. This is done post-object construction, so do not attempt to use - * these loggers in your constructor. - *

- * If you wish to initialize loggers like these yourself, do not use the @Resource - * annotation. - *

- * This implementation first checks to see if the level is enabled before - * issuing the log command. In other words, don't do the following - * if (logger.isTraceEnabled()) logger.trace("message");. - *

- * - * @author Adrian Cole - */ -public interface Logger { - - /** - * Assign to member to avoid NPE when no logging module is configured. - */ - public static final Logger NULL = new NullLogger(); - - String getCategory(); - - void trace(String message, Object... args); - - boolean isTraceEnabled(); - - void debug(String message, Object... args); - - boolean isDebugEnabled(); - - void info(String message, Object... args); - - boolean isInfoEnabled(); - - void warn(String message, Object... args); - - void warn(Throwable throwable, String message, Object... args); - - boolean isWarnEnabled(); - - void error(String message, Object... args); - - void error(Throwable throwable, String message, Object... args); - - boolean isErrorEnabled(); - - /** - * Produces instances of {@link Logger} relevant to the specified category - * - * @author Adrian Cole - * - */ - public static interface LoggerFactory { - public Logger getLogger(String category); - } -} \ No newline at end of file diff --git a/concurrent/src/main/java/org/jclouds/logging/NullLogger.java b/concurrent/src/main/java/org/jclouds/logging/NullLogger.java deleted file mode 100755 index 7c124e5bab..0000000000 --- a/concurrent/src/main/java/org/jclouds/logging/NullLogger.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * - * Copyright (C) 2009 Cloud Conscious, LLC. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 org.jclouds.logging; - -/** - * Logger that doesn't do anything. - *

- * Useful to get baseline performance unaffected by logging. - * - * @author Adrian Cole - * - */ -public class NullLogger implements Logger { - - public void debug(String message, Object... args) { - - } - - public void error(String message, Object... args) { - - } - - public void error(Throwable throwable, String message, Object... args) { - - } - - public String getCategory() { - - return null; - } - - public void info(String message, Object... args) { - - } - - public boolean isDebugEnabled() { - - return false; - } - - public boolean isErrorEnabled() { - - return false; - } - - public boolean isInfoEnabled() { - - return false; - } - - public boolean isTraceEnabled() { - - return false; - } - - public boolean isWarnEnabled() { - - return false; - } - - public void trace(String message, Object... args) { - - } - - public void warn(String message, Object... args) { - - } - - public void warn(Throwable throwable, String message, Object... args) { - - } -} \ No newline at end of file diff --git a/core/pom.xml b/core/pom.xml index 577b32c5eb..5721c3f2f9 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,31 +1,27 @@ - - + http://www.apache.org/licenses/LICENSE-2.0.html 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. + ==================================================================== + --> + jclouds-project org.jclouds @@ -46,8 +42,8 @@ - gson - http://google-gson.googlecode.com/svn/mavenrepo + gson + http://google-gson.googlecode.com/svn/mavenrepo @@ -56,11 +52,6 @@ aopalliance aopalliance 1.0 - - - ${project.groupId} - jclouds-concurrent - ${project.version} org.jboss.resteasy diff --git a/concurrent/src/main/java/org/jclouds/concurrent/FutureExceptionParser.java b/core/src/main/java/org/jclouds/concurrent/FutureExceptionParser.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/FutureExceptionParser.java rename to core/src/main/java/org/jclouds/concurrent/FutureExceptionParser.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/FutureFunctionCallable.java b/core/src/main/java/org/jclouds/concurrent/FutureFunctionCallable.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/FutureFunctionCallable.java rename to core/src/main/java/org/jclouds/concurrent/FutureFunctionCallable.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/FutureFunctionWrapper.java b/core/src/main/java/org/jclouds/concurrent/FutureFunctionWrapper.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/FutureFunctionWrapper.java rename to core/src/main/java/org/jclouds/concurrent/FutureFunctionWrapper.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/RunnableFutureTask.java b/core/src/main/java/org/jclouds/concurrent/RunnableFutureTask.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/RunnableFutureTask.java rename to core/src/main/java/org/jclouds/concurrent/RunnableFutureTask.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/SingleThreadCompatible.java b/core/src/main/java/org/jclouds/concurrent/SingleThreadCompatible.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/SingleThreadCompatible.java rename to core/src/main/java/org/jclouds/concurrent/SingleThreadCompatible.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/SingleThreaded.java b/core/src/main/java/org/jclouds/concurrent/SingleThreaded.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/SingleThreaded.java rename to core/src/main/java/org/jclouds/concurrent/SingleThreaded.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/WithinThreadExecutor.java b/core/src/main/java/org/jclouds/concurrent/WithinThreadExecutor.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/WithinThreadExecutor.java rename to core/src/main/java/org/jclouds/concurrent/WithinThreadExecutor.java diff --git a/concurrent/src/main/java/org/jclouds/concurrent/WithinThreadExecutorService.java b/core/src/main/java/org/jclouds/concurrent/WithinThreadExecutorService.java similarity index 100% rename from concurrent/src/main/java/org/jclouds/concurrent/WithinThreadExecutorService.java rename to core/src/main/java/org/jclouds/concurrent/WithinThreadExecutorService.java diff --git a/concurrent/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java b/core/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java similarity index 100% rename from concurrent/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java rename to core/src/test/java/org/jclouds/concurrent/FutureExceptionParserTest.java diff --git a/project/pom.xml b/project/pom.xml index f67096f3c6..c8ff5084e3 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -140,8 +140,8 @@ ${basedir} - 1.5 - 1.5 + 1.6 + 1.6 true true http://mirror.cloudera.com/apache/maven/binaries/apache-maven-2.2.1-bin.tar.bz2 @@ -265,8 +265,7 @@ true - http://java.sun.com/j2se/1.5.0/docs/api/ - http://java.sun.com/javaee/5/docs/api/ + http://java.sun.com/javase/6/docs/api/