incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r921259 - in /sling/trunk/bundles/extensions/event/src: main/java/org/apache/sling/event/ main/java/org/apache/sling/event/impl/ test/java/org/apache/sling/event/impl/
Date Wed, 10 Mar 2010 09:18:02 GMT
Author: cziegeler
Date: Wed Mar 10 09:17:37 2010
New Revision: 921259

URL: http://svn.apache.org/viewvc?rev=921259&view=rev
Log:
SLING-1433 : Move ThreadPool interface into impl package

Added:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/ThreadPool.java
      - copied, changed from r920718, sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/ThreadPool.java
Removed:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/ThreadPool.java
Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/EventUtil.java
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/EventingThreadPool.java
    sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/AbstractRepositoryEventHandlerTest.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/EventUtil.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/EventUtil.java?rev=921259&r1=921258&r2=921259&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/EventUtil.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/EventUtil.java
Wed Mar 10 09:17:37 2010
@@ -165,8 +165,8 @@ public abstract class EventUtil {
      * @param properties
      * @return An OSGi event.
      */
-    public static Event createDistributableEvent(String topic,
-                                                 Dictionary<String, Object> properties)
{
+    public static Event createDistributableEvent(final String topic,
+                                                 final Dictionary<String, Object> properties)
{
         final Dictionary<String, Object> newProperties;
         // create a new dictionary
         newProperties = new Hashtable<String, Object>();
@@ -187,7 +187,7 @@ public abstract class EventUtil {
      * @param event
      * @return <code>true</code> if the event should be distributed.
      */
-    public static boolean shouldDistribute(Event event) {
+    public static boolean shouldDistribute(final Event event) {
         return event.getProperty(PROPERTY_DISTRIBUTE) != null;
     }
 
@@ -196,7 +196,7 @@ public abstract class EventUtil {
      * @param event
      * @return <code>true</code> if this is a local event
      */
-    public static boolean isLocal(Event event) {
+    public static boolean isLocal(final Event event) {
         final String appId = getApplicationId(event);
         return appId == null || appId.equals(AbstractRepositoryEventHandler.APPLICATION_ID);
     }
@@ -206,7 +206,7 @@ public abstract class EventUtil {
      * @param event
      * @return The application id or null if the event has been created locally.
      */
-    public static String getApplicationId(Event event) {
+    public static String getApplicationId(final Event event) {
         return (String)event.getProperty(PROPERTY_APPLICATION);
     }
 
@@ -217,7 +217,7 @@ public abstract class EventUtil {
      * @param event The event to check.
      * @return <code>true></code> if this is a job event.
      */
-    public static boolean isJobEvent(Event event) {
+    public static boolean isJobEvent(final Event event) {
         return event.getProperty(PROPERTY_JOB_TOPIC) != null;
     }
 
@@ -247,7 +247,7 @@ public abstract class EventUtil {
      * @throws IllegalArgumentException If the event is a job event but does not have a notifier
context.
      * @since 2.3
      */
-    public static boolean acknowledgeJob(Event job) {
+    public static boolean acknowledgeJob(final Event job) {
         final JobStatusNotifier.NotifierContext ctx = getNotifierContext(job);
         if ( ctx != null ) {
             if ( !ctx.notifier.sendAcknowledge(job, ctx.eventNodePath) ) {
@@ -265,7 +265,7 @@ public abstract class EventUtil {
      * Notify a finished job.
      * @throws IllegalArgumentException If the event is a job event but does not have a notifier
context.
      */
-    public static void finishedJob(Event job) {
+    public static void finishedJob(final Event job) {
         final JobStatusNotifier.NotifierContext ctx = getNotifierContext(job);
         if ( ctx != null ) {
             ctx.notifier.finishedJob(job, ctx.eventNodePath, false);
@@ -277,7 +277,7 @@ public abstract class EventUtil {
      * @return <code>true</code> if the job has been rescheduled, <code>false</code>
otherwise.
      * @throws IllegalArgumentException If the event is a job event but does not have a notifier
context.
      */
-    public static boolean rescheduleJob(Event job) {
+    public static boolean rescheduleJob(final Event job) {
         final JobStatusNotifier.NotifierContext ctx = getNotifierContext(job);
         if ( ctx != null ) {
             return ctx.notifier.finishedJob(job, ctx.eventNodePath, true);

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java?rev=921259&r1=921258&r2=921259&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/AbstractRepositoryEventHandler.java
Wed Mar 10 09:17:37 2010
@@ -37,7 +37,6 @@ import org.apache.sling.commons.classloa
 import org.apache.sling.commons.osgi.OsgiUtil;
 import org.apache.sling.engine.SlingSettingsService;
 import org.apache.sling.event.JobStatusProvider;
-import org.apache.sling.event.ThreadPool;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.resource.JcrResourceUtil;
 import org.osgi.service.component.ComponentContext;

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/EventingThreadPool.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/EventingThreadPool.java?rev=921259&r1=921258&r2=921259&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/EventingThreadPool.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/EventingThreadPool.java
Wed Mar 10 09:17:37 2010
@@ -26,7 +26,6 @@ import org.apache.sling.commons.osgi.Osg
 import org.apache.sling.commons.threads.ModifiableThreadPoolConfig;
 import org.apache.sling.commons.threads.ThreadPoolConfig;
 import org.apache.sling.commons.threads.ThreadPoolManager;
-import org.apache.sling.event.ThreadPool;
 import org.osgi.service.component.ComponentContext;
 
 

Copied: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/ThreadPool.java
(from r920718, sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/ThreadPool.java)
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/ThreadPool.java?p2=sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/ThreadPool.java&p1=sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/ThreadPool.java&r1=920718&r2=921259&rev=921259&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/ThreadPool.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/ThreadPool.java
Wed Mar 10 09:17:37 2010
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.event;
+package org.apache.sling.event.impl;
 
 /**
  * The eventing thread pool is a special thread pool used for the eventing.

Modified: sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/AbstractRepositoryEventHandlerTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/AbstractRepositoryEventHandlerTest.java?rev=921259&r1=921258&r2=921259&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/AbstractRepositoryEventHandlerTest.java
(original)
+++ sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/AbstractRepositoryEventHandlerTest.java
Wed Mar 10 09:17:37 2010
@@ -31,7 +31,6 @@ import javax.jcr.Session;
 import org.apache.sling.commons.threads.ModifiableThreadPoolConfig;
 import org.apache.sling.commons.threads.ThreadPoolConfig;
 import org.apache.sling.engine.SlingSettingsService;
-import org.apache.sling.event.ThreadPool;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.jmock.Expectations;
 import org.jmock.Mockery;



Mime
View raw message