Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.compiler
Interface CompilerAccess

All Known Subinterfaces:
  CompilerAccessRemote

All Known Implementing Classes:
  CompilerAccessLogic

    public interface CompilerAccess

This is the RMI interface class to send commands to the M4 compiler. It is called to execute single steps, a sequence of steps or to update statistics of the M4 model.

Version:
  $Id: CompilerAccess.java,v 1.7 2006/09/27 14:59:54 euler Exp $
Author:
  Martin Scholz

Method Summary
`void` | `changeCompilerOutputVerbosity(long caseId, java.util.logging.Level newVerbosity)` Change the verbosity level of the compiler log messages for the given case.
`void` | `compileAll(long caseId, boolean lazyMode)` This method is given the ID of a `Case` to be compiled.
`void` | `compileStep(long stepID, boolean lazyMode)` This method is given the ID of the step to be compiled.
`void` | `compileStep(java.lang.String stepName, boolean lazyMode)` This method is given the name of the step to be compiled, as specified in table STEP_T, attribute ST_NAME.
`void` | `compileStepFrom(long stepId, boolean lazyMode)` This method is given the ID of the first `Step` of a subtree to be compiled.
`void` | `compileStepTo(long stepId, boolean lazyMode, boolean ignoreCompiledStatus)` This method compiles all Steps that need to be compiled before the given Step can be compiled; then it compiles the given Step.
`void` | `deleteTrashForCase(long caseId)` Runs the garbage collection for all `Step`s of a specified `Case`.
`void` | `deleteTrashForStep(long stepId)` Runs the garbage collection for the specified `Step` and all subsequent dependent `Step`s with respect to the entries in the table STEPSEQUENCE_T.
`java.lang.String` | `getStatusFromLine(long caseId, int lineNumber)` Reads the status message of a running compiler server thread.
`java.lang.String` | `getStatusMessage(long caseId, int numberOfLines)` Reads the status message of a running compiler server thread.
`boolean` | `isReadyForCompilation(long stepId)` This method checks for a given `Step`, if it can currently be compiled.
`boolean` | `killCompilerThread(long caseId)` This method kills a running compiler thread.
`void` | `updateColumnsetStatistics(long columnsetID)` Uses the stored procedures of the database to update the statistics of the specified column set and of all the columns contained in the column set.
`void` | `updateColumnStatistics(long columnID)` Uses the stored procedures of the database to update the statistics of the specified column.
`void` | `updateStatisticsForConcept(long conceptID)` Uses the stored procedures of the database to update all the statistics which are related to the specified concept.

Method Detail

### compileStep

    void compileStep(long stepID,
                     boolean lazyMode)
                     throws M4CompilerInterfaceError,
                            M4CompilerWarning,
                            UserError

  This method is given the ID of the step to be compiled. If the lazy mode flag is set, then a less time consuming execution is performed.

  An exception is thrown if the step is not present in the according M4 table, if parameters are missing, if references are invalid, if the database connection fails or if the execution of an operator fails.

  Parameters:
    `stepID` - the ID of the step in STEP_T
    `lazyMode` - a flag indicating if the compiler should run in lazy mode or not
  Throws:
    `M4CompilerInterfaceError`
    `M4CompilerWarning`
    `UserError`

### compileStep

    void compileStep(java.lang.String stepName,
                     boolean lazyMode)
                     throws M4CompilerInterfaceError,
                            M4CompilerWarning,
                            UserError

  This method is given the name of the step to be compiled, as specified in table STEP_T, attribute ST_NAME. If the lazy mode flag is set, then a less time consuming execution is performed.

  An exception is thrown if the step is not present in the according M4 table, if parameters are missing, if references are invalid, if the database connection fails or if the execution of an operator fails.

  Parameters:
    `stepName` - the name of the step in STEP_T
    `lazyMode` - a flag indicating if the compiler should run in lazy mode or not
  Throws:
    `M4CompilerInterfaceError`
    `M4CompilerWarning`
    `UserError`

### compileAll

    void compileAll(long caseId,
                    boolean lazyMode)
                    throws M4CompilerInterfaceError,
                           M4CompilerWarning,
                           UserError

  This method is given the ID of a `Case` to be compiled. The compiler calculates a valid sequential order of the embedded `step`s with respect to the constraints introduced by the STEPSEQUENCE_T table. If the lazy mode flag is set, then a less time consuming execution is performed.

  An exception is thrown if there is no valid sequence (e.g. cyclic dependencies), if there are no steps connected to the given case, if parameters are missing, if references are invalid, if the database connection fails or if the execution of an operator fails.

  Parameters:
    `caseId` - the ID of the case to be compiled
    `lazyMode` - a flag indicating if the compiler should run in lazy mode or not
  Throws:
    `M4CompilerInterfaceError`
    `M4CompilerWarning`
    `UserError`

### compileStepFrom

    void compileStepFrom(long stepId,
                         boolean lazyMode)
                         throws M4CompilerInterfaceError,
                                M4CompilerWarning,
                                UserError

  This method is given the ID of the first `Step` of a subtree to be compiled. The compiler calculates a valid sequential order of the subtree defined by and with respect to the constraints introduced by the STEPSEQUENCE_T table. If the lazy mode flag is set, then a less time consuming execution is performed.

  An exception is thrown if there is no valid sequence (e.g. cyclic dependencies), if there are no steps connected to the given case, if parameters are missing, if references are invalid, if the database connection fails or if the execution of an operator fails.

  Parameters:
    `stepId` - the ID of the first step to be compiled
    `lazyMode` - a flag indicating if the compiler should run in lazy mode or not
  Throws:
    `M4CompilerInterfaceError`
    `M4CompilerWarning`
    `UserError`

### compileStepTo

    void compileStepTo(long stepId,
                       boolean lazyMode,
                       boolean ignoreCompiledStatus)
                       throws M4CompilerInterfaceError,
                              M4CompilerWarning,
                              UserError

  This method compiles all Steps that need to be compiled before the given Step can be compiled; then it compiles the given Step.

  Parameters:
    `stepId` - the ID of the last step to be compiled
    `lazyMode` - a flag indicating if the compiler should run in lazy mode or not
    `ignoreCompiledStatus` - if TRUE, only the graph structure determines which Steps are compiled. If FALSE, only those Steps among the predecessors of the given Step are compiled that have not been compiled yet. In the latter case, only Steps on the shortest paths from a compiled step to the given Step are compiled, and no Steps that precede an already compiled Step are compiled.
  Throws:
    `M4CompilerInterfaceError`
    `M4CompilerWarning`
    `UserError`

### updateStatisticsForConcept

    void updateStatisticsForConcept(long conceptID)
                                    throws java.rmi.RemoteException,
                                           M4CompilerInterfaceError

  Uses the stored procedures of the database to update all the statistics which are related to the specified concept. These are the statistics of the related column sets and of all the columns contained.

  Parameters:
    `conceptID` - the ID of the concept in table CONCEPT_T for which the statistics shall be updated
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### updateColumnsetStatistics

    void updateColumnsetStatistics(long columnsetID)
                                   throws java.rmi.RemoteException,
                                          M4CompilerInterfaceError

  Uses the stored procedures of the database to update the statistics of the specified column set and of all the columns contained in the column set.

  Parameters:
    `columnsetID` - the ID of column set in table COLUMNSET_T for which the statistics shall be updated
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### updateColumnStatistics

    void updateColumnStatistics(long columnID)
                                throws java.rmi.RemoteException,
                                       M4CompilerInterfaceError

  Uses the stored procedures of the database to update the statistics of the specified column.

  Parameters:
    `columnID` - the ID of column set in table COLUMN_T for which the statistics shall be updated
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### deleteTrashForStep

    void deleteTrashForStep(long stepId)
                            throws java.rmi.RemoteException,
                                   M4CompilerInterfaceError

  Runs the garbage collection for the specified `Step` and all subsequent dependent `Step`s with respect to the entries in the table STEPSEQUENCE_T.

  Parameters:
    `stepId` - the ID of the (first) `Step` to run the garbage collection for.
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### deleteTrashForCase

    void deleteTrashForCase(long caseId)
                            throws java.rmi.RemoteException,
                                   M4CompilerInterfaceError

  Runs the garbage collection for all `Step`s of a specified `Case`.

  Parameters:
    `caseId` - of the `Case` to run the garbage collection for.
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### getStatusMessage

    java.lang.String getStatusMessage(long caseId,
                                      int numberOfLines)
                                      throws java.rmi.RemoteException,
                                             M4CompilerInterfaceError

  Reads the status message of a running compiler server thread.

  Parameters:
    `caseId` - the id of the case to receive log information for. Because of the case locking mechanism each case is never compiled more than once at the same time, so this is a unique Thread identifier. A caseId of 0 or lower is interpreted as the default Print class, used before having found the right case or in case of severe errors.
    `numberOfLines` - the numberOfLines to be returned
  Returns:
    the last number of lines from the status logfile of the thread The first line holds the line number after the last line, so that using this number as the line number in the next call will return the log messages collected in between.
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### getStatusFromLine

    java.lang.String getStatusFromLine(long caseId,
                                       int lineNumber)
                                       throws java.rmi.RemoteException,
                                              M4CompilerInterfaceError

  Reads the status message of a running compiler server thread. A start line number is specified. The log messages starting from this line number up to the end are returned.

  Parameters:
    `caseId` - the id of the case to receive log information for. Because of the case locking mechanism each case is never compiled more than once at the same time, so this is a unique Thread identifier. A caseId of 0 or lower is interpreted as the default Print class, used before having found the right case or in case of severe errors.
    `lineNumber` - the first line of the logfile to be returned
  Returns:
    the last lines from the status logfile of the thread, starting with the lineNumber specified as a parameter.
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### changeCompilerOutputVerbosity

    void changeCompilerOutputVerbosity(long caseId,
                                       java.util.logging.Level newVerbosity)
                                       throws java.rmi.RemoteException,
                                              M4CompilerInterfaceError

  Change the verbosity level of the compiler log messages for the given case.

  Parameters:
    `caseId` - the id of the case to receive log information for. Because of the case locking mechanism each case is never compiled more than once at the same time, so this is a unique Thread identifier. A caseId of 0 or lower is interpreted as the default Print class, used before having found the right case or in case of severe errors.
    `newVerbosity` - The new verbosity. Use one of the public constants of the class edu.udo.cs.miningmart.m4.utils.Print, if possible.
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### isReadyForCompilation

    boolean isReadyForCompilation(long stepId)
                                  throws java.rmi.RemoteException,
                                         M4CompilerInterfaceError

  This method checks for a given `Step`, if it can currently be compiled. Validity aspects are not checked, but for all `Step`s the given `Step` depends on (regarding to STEPSEQUENCE_T) it is made sure that they have recently (after the last garbage collection) been compiled, so the outputs of these `Step`s are available in the database.

  Parameters:
    `stepId` - the ID of the `Step`
  Returns:
    if all `Step`s this `Step` depends on have been compiled
  Throws:
    `java.rmi.RemoteException`
    `M4CompilerInterfaceError`

### killCompilerThread

    boolean killCompilerThread(long caseId)
                               throws java.rmi.RemoteException

  This method kills a running compiler thread. Threads are identified by the `Case` they are compiling. Nevertheless, for a few seconds after launching a `compileStep` command this method may not succeed in identifying the right Thread. For this reason, there is a return value. It is a good idea to send kill request until `true` is returned. A Thread is killed by a special exception, which is finally translated to an `M4CompilerInterfaceError`.

  Parameters:
    `caseId` - The ID of the case for which the compiler thread should be killed.
  Returns:
    `true` iff a thread for the given case has been found and the the kill flag has been set.
  Throws:
    `java.rmi.RemoteException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005