Author: cziegeler Date: Wed Oct 15 17:57:24 2014 New Revision: 1632142 URL: http://svn.apache.org/r1632142 Log: SLING-4048 : Avoid keeping jobs in memory. Rewrite statistics, queue and topic handling (WiP)
Added: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/ - copied from r1632139, sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/topology/ Removed: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/topology/ Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobSchedulerImpl.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/MaintenanceTask.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/InventoryPlugin.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/WebConsolePlugin.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topics/TopicManager.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/MaintenanceTask.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/RestartTask.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyAware.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyCapabilities.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyHandler.java sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/UpgradeTask.java sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/jobs/InstanceDescriptionComparatorTest.java Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobConsumerManager.java Wed Oct 15 17:57:24 2014 @@ -40,9 +40,9 @@ import org.apache.felix.scr.annotations. import org.apache.felix.scr.annotations.Service; import org.apache.sling.commons.osgi.PropertiesUtil; import org.apache.sling.discovery.PropertyProvider; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; import org.apache.sling.event.impl.support.TopicMatcher; import org.apache.sling.event.impl.support.TopicMatcherHelper; -import org.apache.sling.event.impl.topology.TopologyCapabilities; import org.apache.sling.event.jobs.Job; import org.apache.sling.event.jobs.consumer.JobConsumer; import org.apache.sling.event.jobs.consumer.JobConsumer.JobResult; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java Wed Oct 15 17:57:24 2014 @@ -52,12 +52,12 @@ import org.apache.sling.event.impl.jobs. import org.apache.sling.event.impl.jobs.queues.AbstractJobQueue; import org.apache.sling.event.impl.jobs.queues.QueueManager; import org.apache.sling.event.impl.jobs.stats.StatisticsManager; +import org.apache.sling.event.impl.jobs.topology.TopologyAware; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; +import org.apache.sling.event.impl.jobs.topology.TopologyHandler; import org.apache.sling.event.impl.support.Environment; import org.apache.sling.event.impl.support.ResourceHelper; import org.apache.sling.event.impl.support.ScheduleInfoImpl; -import org.apache.sling.event.impl.topology.TopologyAware; -import org.apache.sling.event.impl.topology.TopologyCapabilities; -import org.apache.sling.event.impl.topology.TopologyHandler; import org.apache.sling.event.jobs.Job; import org.apache.sling.event.jobs.JobBuilder; import org.apache.sling.event.jobs.JobManager; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobSchedulerImpl.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobSchedulerImpl.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobSchedulerImpl.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobSchedulerImpl.java Wed Oct 15 17:57:24 2014 @@ -46,11 +46,11 @@ import org.apache.sling.api.resource.Val import org.apache.sling.commons.scheduler.JobContext; import org.apache.sling.commons.scheduler.ScheduleOptions; import org.apache.sling.commons.scheduler.Scheduler; +import org.apache.sling.event.impl.jobs.topology.TopologyAware; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; import org.apache.sling.event.impl.support.Environment; import org.apache.sling.event.impl.support.ResourceHelper; import org.apache.sling.event.impl.support.ScheduleInfoImpl; -import org.apache.sling.event.impl.topology.TopologyAware; -import org.apache.sling.event.impl.topology.TopologyCapabilities; import org.apache.sling.event.jobs.Job; import org.apache.sling.event.jobs.JobBuilder; import org.apache.sling.event.jobs.ScheduleInfo; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/MaintenanceTask.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/MaintenanceTask.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/MaintenanceTask.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/MaintenanceTask.java Wed Oct 15 17:57:24 2014 @@ -30,9 +30,9 @@ import org.apache.sling.api.resource.Res import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.api.resource.ResourceUtil; import org.apache.sling.api.resource.ValueMap; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; import org.apache.sling.event.impl.support.BatchResourceRemover; import org.apache.sling.event.impl.support.ResourceHelper; -import org.apache.sling.event.impl.topology.TopologyCapabilities; import org.apache.sling.event.jobs.Job; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/InventoryPlugin.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/InventoryPlugin.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/InventoryPlugin.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/InventoryPlugin.java Wed Oct 15 17:57:24 2014 @@ -41,7 +41,7 @@ import org.apache.sling.event.impl.jobs. import org.apache.sling.event.impl.jobs.JobManagerImpl; import org.apache.sling.event.impl.jobs.config.InternalQueueConfiguration; import org.apache.sling.event.impl.jobs.config.QueueConfigurationManager; -import org.apache.sling.event.impl.topology.TopologyCapabilities; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; import org.apache.sling.event.jobs.JobManager; import org.apache.sling.event.jobs.Queue; import org.apache.sling.event.jobs.QueueConfiguration; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/WebConsolePlugin.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/WebConsolePlugin.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/WebConsolePlugin.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/console/WebConsolePlugin.java Wed Oct 15 17:57:24 2014 @@ -42,7 +42,7 @@ import org.apache.sling.event.impl.jobs. import org.apache.sling.event.impl.jobs.JobManagerImpl; import org.apache.sling.event.impl.jobs.config.InternalQueueConfiguration; import org.apache.sling.event.impl.jobs.config.QueueConfigurationManager; -import org.apache.sling.event.impl.topology.TopologyCapabilities; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; import org.apache.sling.event.jobs.Job; import org.apache.sling.event.jobs.JobManager; import org.apache.sling.event.jobs.Queue; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topics/TopicManager.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topics/TopicManager.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topics/TopicManager.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topics/TopicManager.java Wed Oct 15 17:57:24 2014 @@ -45,10 +45,10 @@ import org.apache.sling.event.impl.jobs. import org.apache.sling.event.impl.jobs.config.QueueConfigurationManager; import org.apache.sling.event.impl.jobs.config.QueueConfigurationManager.QueueInfo; import org.apache.sling.event.impl.jobs.queues.QueueManager; +import org.apache.sling.event.impl.jobs.topology.TopologyAware; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; +import org.apache.sling.event.impl.jobs.topology.TopologyHandler; import org.apache.sling.event.impl.support.BatchResourceRemover; -import org.apache.sling.event.impl.topology.TopologyAware; -import org.apache.sling.event.impl.topology.TopologyCapabilities; -import org.apache.sling.event.impl.topology.TopologyHandler; import org.apache.sling.event.jobs.JobManager; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/MaintenanceTask.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/MaintenanceTask.java?rev=1632142&r1=1632139&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/MaintenanceTask.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/MaintenanceTask.java Wed Oct 15 17:57:24 2014 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.sling.event.impl.topology; +package org.apache.sling.event.impl.jobs.topology; import java.util.HashMap; import java.util.Iterator; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/RestartTask.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/RestartTask.java?rev=1632142&r1=1632139&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/RestartTask.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/RestartTask.java Wed Oct 15 17:57:24 2014 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.sling.event.impl.topology; +package org.apache.sling.event.impl.jobs.topology; import java.util.Iterator; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyAware.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyAware.java?rev=1632142&r1=1632139&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyAware.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyAware.java Wed Oct 15 17:57:24 2014 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.sling.event.impl.topology; +package org.apache.sling.event.impl.jobs.topology; public interface TopologyAware { Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyCapabilities.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyCapabilities.java?rev=1632142&r1=1632139&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyCapabilities.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyCapabilities.java Wed Oct 15 17:57:24 2014 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.sling.event.impl.topology; +package org.apache.sling.event.impl.jobs.topology; import java.util.ArrayList; import java.util.Collections; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyHandler.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyHandler.java?rev=1632142&r1=1632139&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyHandler.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/TopologyHandler.java Wed Oct 15 17:57:24 2014 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.sling.event.impl.topology; +package org.apache.sling.event.impl.jobs.topology; import java.util.ArrayList; import java.util.List; Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/UpgradeTask.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/UpgradeTask.java?rev=1632142&r1=1632139&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/UpgradeTask.java (original) +++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/topology/UpgradeTask.java Wed Oct 15 17:57:24 2014 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.sling.event.impl.topology; +package org.apache.sling.event.impl.jobs.topology; import java.io.IOException; import java.io.ObjectInputStream; Modified: sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/jobs/InstanceDescriptionComparatorTest.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/jobs/InstanceDescriptionComparatorTest.java?rev=1632142&r1=1632141&r2=1632142&view=diff ============================================================================== --- sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/jobs/InstanceDescriptionComparatorTest.java (original) +++ sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/impl/jobs/InstanceDescriptionComparatorTest.java Wed Oct 15 17:57:24 2014 @@ -27,7 +27,7 @@ import java.util.Map; import org.apache.sling.discovery.ClusterView; import org.apache.sling.discovery.InstanceDescription; -import org.apache.sling.event.impl.topology.TopologyCapabilities; +import org.apache.sling.event.impl.jobs.topology.TopologyCapabilities; public class InstanceDescriptionComparatorTest {