// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/exceptions/ActionInstanceNotFoundException.java
// public class ActionInstanceNotFoundException extends Exception {
// 
//     public ActionInstanceNotFoundException(String message) {
//         super(message);
//     }
// 
//     public ActionInstanceNotFoundException(String message, Throwable throwable) {
//         super(message, throwable);
//     }
// }
// 
// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/executors/Executor.java
// public interface Executor {
//     public void execute(Action action, ActionInstance actionInstance, Execution execution) throws ExecutionException;
//     public void cancel(Action action, ActionInstance actionInstance, Execution execution) throws ExecutionException;
// }
// 
// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/persistence/ExecutionDao.java
// public interface ExecutionDao {
// 
//     public String createExecution(String actionInstanceId, Execution execution);
//     public void updateExecution(Execution execution);
//     public Execution getExecution(String executionId);
//     public void deleteExecution(String actionInstanceId, Execution execution);
//     public List<Execution> getExecutions(String actionInstanceId, int count);
//     public List<Execution> getExecutions(String actionInstanceId);
// 
// }


import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.netflix.fenzo.triggers.TriggerOperator;
import com.netflix.fenzo.triggers.exceptions.SchedulerException;
import com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException;
import com.netflix.scheduledactions.exceptions.ActionOperationException;
import com.netflix.scheduledactions.exceptions.ExecutionException;
import com.netflix.scheduledactions.exceptions.ExecutionNotFoundException;
import com.netflix.scheduledactions.executors.Executor;
import com.netflix.scheduledactions.persistence.ActionInstanceDao;
import com.netflix.scheduledactions.persistence.ExecutionDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rx.functions.Action1;
import java.util.ArrayList;
/*
 * Copyright 2015 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.scheduledactions;



public class AbstractActionOperationsDelegate implements ActionOperationsDelegate {

    private static final Logger logger = LoggerFactory.getLogger(DefaultActionOperationsDelegate.class);

    protected final TriggerOperator triggerOperator;
    protected final ActionInstanceDao actionInstanceDao;
// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/exceptions/ActionInstanceNotFoundException.java
// public class ActionInstanceNotFoundException extends Exception {
// 
//     public ActionInstanceNotFoundException(String message) {
//         super(message);
//     }
// 
//     public ActionInstanceNotFoundException(String message, Throwable throwable) {
//         super(message, throwable);
//     }
// }
// 
// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/executors/Executor.java
// public interface Executor {
//     public void execute(Action action, ActionInstance actionInstance, Execution execution) throws ExecutionException;
//     public void cancel(Action action, ActionInstance actionInstance, Execution execution) throws ExecutionException;
// }
// 
// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/persistence/ExecutionDao.java
// public interface ExecutionDao {
// 
//     public String createExecution(String actionInstanceId, Execution execution);
//     public void updateExecution(Execution execution);
//     public Execution getExecution(String executionId);
//     public void deleteExecution(String actionInstanceId, Execution execution);
//     public List<Execution> getExecutions(String actionInstanceId, int count);
//     public List<Execution> getExecutions(String actionInstanceId);
// 
// }


// Path: scheduled-actions-core/src/main/java/com/netflix/scheduledactions/AbstractActionOperationsDelegate.java
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.netflix.fenzo.triggers.TriggerOperator;
import com.netflix.fenzo.triggers.exceptions.SchedulerException;
import com.netflix.scheduledactions.exceptions.ActionInstanceNotFoundException;
import com.netflix.scheduledactions.exceptions.ActionOperationException;
import com.netflix.scheduledactions.exceptions.ExecutionException;
import com.netflix.scheduledactions.exceptions.ExecutionNotFoundException;
import com.netflix.scheduledactions.executors.Executor;
import com.netflix.scheduledactions.persistence.ActionInstanceDao;
import com.netflix.scheduledactions.persistence.ExecutionDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rx.functions.Action1;
import java.util.ArrayList;

/*
 * Copyright 2015 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.scheduledactions;



public class AbstractActionOperationsDelegate implements ActionOperationsDelegate {

    private static final Logger logger = LoggerFactory.getLogger(DefaultActionOperationsDelegate.class);

    protected final TriggerOperator triggerOperator;
    protected final ActionInstanceDao actionInstanceDao;
    protected final ExecutionDao executionDao;