@@ -0,0 +1,3071 @@
+/**%0A * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies%0A *%0A * Please see distribution for license.%0A */%0Apackage com.opengamma.financial.batch;%0A%0Aimport java.util.Set;%0A%0Aimport javax.time.calendar.OffsetTime;%0A%0Aimport com.opengamma.engine.view.calc.DependencyGraphExecutorFactory;%0A%0A/**%0A * A master for storing batch job runs.%0A * %3Cp%3E%0A * This extends %7B@code BatchMaster%7D to provide tools to store batches.%0A */%0Apublic interface BatchRunMaster extends BatchMaster %7B%0A%0A  /**%0A   * Starts the storage of a batch job run.%0A   * %3Cp%3E%0A   * This creates all static data structures, such as compute host, OpenGamma%0A   * version and risk run. This method must be called before any risk can be%0A   * written for the batch in question.%0A   * %0A   * @param batch  the batch job which is starting, not null%0A   */%0A  void startBatch(BatchJobRun batch);%0A%0A  /**%0A   * Ends the storage of a batch job run.%0A   * %3Cp%3E%0A   * This marks the batch as complete.%0A   * %0A   * @param batch  the batch job which has finished, not null%0A   */%0A  void endBatch(BatchJobRun batch);%0A%0A  //-------------------------------------------------------------------------%0A  /**%0A   * Creates a LiveData snapshot in the database. %0A   * If the snapshot already exists, does nothing.%0A   * %0A   * @param snapshotId The date and time of the snapshot, not null%0A   */%0A  void createLiveDataSnapshot(SnapshotId snapshotId);%0A%0A  /**%0A   * Fixes the time of a LiveData snapshot in the database.%0A   * For example, the head trader may set the time of LDN_CLOSE every day.%0A   * One day he may set it at 17:31, the next at 17:44. %0A   * %0A   * @param snapshotId The date and time of the snapshot, not null%0A   * @param fix The time to which the observation time was fixed, not null%0A   */%0A  void fixLiveDataSnapshotTime(SnapshotId snapshotId, OffsetTime fix);%0A%0A  /**%0A   * Adds market data fixings to an existing LiveData snapshot. The%0A   * snapshot must already exist.%0A   * %0A   * @param snapshotId The date and time of the snapshot, not null%0A   * @param values The fixings, not null%0A   */%0A  void addValuesToSnapshot(SnapshotId snapshotId, Set%3CLiveDataValue%3E values);%0A%0A  /**%0A   * Gets all market data fixings associated with an existing snapshot.%0A   * %0A   * @param snapshotId The date and time of the snapshot, not null%0A   * @return The fixings associated with this snapshot, not null%0A   * @throws IllegalArgumentException If a snapshot with the given%0A   * ID does not exist%0A   */%0A  Set%3CLiveDataValue%3E getSnapshotValues(SnapshotId snapshotId);%0A%0A  /**%0A   * Gets a factory for executing dependency graphs and%0A   * writing risk values into the database.%0A   * %3Cp%3E%0A   * The risk is written into the database incrementally,%0A   * as the dependency graph is being executed. This%0A   * is useful if you do not already have the results in%0A   * memory.%0A   * %0A   * @param batch The batch job for which results will be written%0A   * @return A factory used to execute the batch dependency graph%0A   * and write results into the database.%0A   */%0A  DependencyGraphExecutorFactory%3C?%3E createDependencyGraphExecutorFactory(BatchJobRun batch);%0A%0A%7D%0A

Make batch master more standard