001/* A base class for DDP pattern actor stubs.
002 * 
003 * Copyright (c) 2011-2012 The Regents of the University of California.
004 * All rights reserved.
005 *
006 * '$Author: crawl $'
007 * '$Date: 2014-04-12 00:09:39 +0000 (Sat, 12 Apr 2014) $' 
008 * '$Revision: 32657 $'
009 * 
010 * Permission is hereby granted, without written agreement and without
011 * license or royalty fees, to use, copy, modify, and distribute this
012 * software and its documentation for any purpose, provided that the above
013 * copyright notice and the following two paragraphs appear in all copies
014 * of this software.
015 *
016 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
017 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
018 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
019 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
020 * SUCH DAMAGE.
021 *
022 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
023 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
025 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
026 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
027 * ENHANCEMENTS, OR MODIFICATIONS.
028 *
029 */
030package org.kepler.ddp.actor.pattern.stub;
031
032import ptolemy.actor.TypedAtomicActor;
033import ptolemy.kernel.CompositeEntity;
034import ptolemy.kernel.util.IllegalActionException;
035import ptolemy.kernel.util.NameDuplicationException;
036
037/** A base class for DDP pattern actor stubs. A stub actor transfers
038 *  data between the Kepler workflow and the underlying execution engine
039 *  (e.g., Stratosphere or Hadoop).
040 * 
041 *  @author Daniel Crawl
042 *  @version $Id: StubBaseActor.java 32657 2014-04-12 00:09:39Z crawl $
043 */
044public class StubBaseActor extends TypedAtomicActor {
045
046    /** Construct a new StubBaseActor in a container with a given name. */
047    public StubBaseActor(CompositeEntity container, String name)
048            throws IllegalActionException, NameDuplicationException {
049        super(container, name);
050    }
051
052    /** Set if the full the full lifecycle of the sub-workflow will be executed
053     * for each input. If false, only a single interation occurs for each input.
054     */
055    public void setRunWorkflowLifecyclePerInput(boolean runWorkflowLifecyclePerInput) {
056        _runWorkflowLifecyclePerInput = runWorkflowLifecyclePerInput;
057    }
058
059    /** If true, the full the full lifecycle of the sub-workflow will be executed for each input. */
060    protected boolean _runWorkflowLifecyclePerInput = false;
061
062}