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 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  Queue<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  Callable createServiceExecution(org.osgi.framework.ServiceReference serviceReference, com.atlassian.tenancy.api.Tenant tenant, com.google.common.base.Function<S,?> serviceCallback)
           
protected  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 Queue<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 Callable createServiceExecution(org.osgi.framework.ServiceReference serviceReference,
                                          com.atlassian.tenancy.api.Tenant tenant,
                                          com.google.common.base.Function<S,?> serviceCallback)

getDescription

protected String getDescription()


Copyright © 2003–2015 Atlassian. All rights reserved.