@@ -0,0 +1,724 @@
+package io.cattle.platform.task;%0A%0Aimport javax.inject.Inject;%0A%0Aimport io.cattle.platform.lock.LockDelegator;%0Aimport io.cattle.platform.lock.definition.LockDefinition;%0A%0Apublic abstract class AbstractSingletonTask implements LockDefinition, Task %7B%0A%0A    LockDelegator delegator;%0A%0A    @Override%0A    public final void run() %7B%0A        if ( ! delegator.tryLock(this) ) %7B%0A            return;%0A        %7D%0A%0A        doRun();%0A    %7D%0A%0A    protected abstract void doRun();%0A%0A    @Override%0A    public String getLockId() %7B%0A        return getName();%0A    %7D%0A%0A    public LockDelegator getDelegator() %7B%0A        return delegator;%0A    %7D%0A%0A    @Inject%0A    public void setDelegator(LockDelegator delegator) %7B%0A        this.delegator = delegator;%0A    %7D%0A%0A%7D%0A

add abstract singleton task