com.atlassian.sal.confluence.lifecycle
Class ExecutionStrategyTemplate<S>

java.lang.Object
  extended by com.atlassian.sal.confluence.lifecycle.ExecutionStrategyTemplate<S>
All Implemented Interfaces:
ServiceExecutionStrategy<S>
Direct Known Subclasses:
FireAndForgetExecutionStrategy, ForkAndJoinExecutionStrategy, SequentialExecutionStrategy

public abstract class ExecutionStrategyTemplate<S>
extends java.lang.Object
implements ServiceExecutionStrategy<S>

Template for service executions

Since:
5.6

Field Summary
protected  com.google.common.base.Function<org.osgi.framework.ServiceReference,com.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey>> moduleReferenceParser
           
protected  java.util.Queue<java.util.concurrent.Callable> serviceExecutions
           
 
Constructor Summary
protected ExecutionStrategyTemplate(com.google.common.base.Function<org.osgi.framework.ServiceReference,com.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey>> moduleReferenceParser)
           
 
Method Summary
 boolean add(org.osgi.framework.ServiceReference serviceReference, com.atlassian.tenancy.api.Tenant tenant, com.google.common.base.Function<S,?> serviceCallback)
           
protected  java.util.concurrent.Callable createServiceExecution(org.osgi.framework.ServiceReference serviceReference, com.atlassian.tenancy.api.Tenant tenant, com.google.common.base.Function<S,?> serviceCallback)
           
protected  java.lang.String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.sal.confluence.lifecycle.ServiceExecutionStrategy
trigger
 

Field Detail

moduleReferenceParser

protected final com.google.common.base.Function<org.osgi.framework.ServiceReference,com.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey>> moduleReferenceParser

serviceExecutions

protected final java.util.Queue<java.util.concurrent.Callable> serviceExecutions
Constructor Detail

ExecutionStrategyTemplate

protected ExecutionStrategyTemplate(com.google.common.base.Function<org.osgi.framework.ServiceReference,com.atlassian.fugue.Option<com.atlassian.plugin.ModuleCompleteKey>> moduleReferenceParser)
Method Detail

add

public boolean add(org.osgi.framework.ServiceReference serviceReference,
                   com.atlassian.tenancy.api.Tenant tenant,
                   com.google.common.base.Function<S,?> serviceCallback)
Specified by:
add in interface ServiceExecutionStrategy<S>

createServiceExecution

protected java.util.concurrent.Callable createServiceExecution(org.osgi.framework.ServiceReference serviceReference,
                                                               com.atlassian.tenancy.api.Tenant tenant,
                                                               com.google.common.base.Function<S,?> serviceCallback)

getDescription

protected java.lang.String getDescription()


Copyright © 2003-2014 Atlassian. All Rights Reserved.