Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.sdo.support
Class SDApplicationBase

java.lang.Object
  extended by com.sigmadynamics.sdo.support.SDOBase
      extended by com.sigmadynamics.sdo.support.SDApplicationBase

All Implemented Interfaces:
ApplicationInterface, SDOInterface
Direct Known Subclasses:
ApplicationBase

public abstract class SDApplicationBase
extends SDOBase
implements ApplicationInterface

Abstract base class for the Application class in generated code, the most important class of an Inline Service. An Inline Service's lifecycle is managed through this class. The Application (bottommost subclass of SDApplicationBase) serves as the main gateway between the RTD Decision Server and an Inline Service.


Field Summary
protected  AppFactoryInterface appFactory
           

 

Fields inherited from class com.sigmadynamics.sdo.support.SDOBase
description, internalName, sdExternalName

 

Method Summary
protected  boolean calculateControlGroupStatus(double val, double percent)
           
protected  boolean calculateControlGroupStatus(int val, double percent)
           
protected  boolean calculateControlGroupStatus(long val, double percent)
           
protected  boolean calculateControlGroupStatus(java.lang.String val, double percent)
           
protected  boolean checkControlGroupStatus(boolean val)
           
protected  boolean checkControlGroupStatus(int val)
           
protected  boolean checkControlGroupStatus(java.lang.String val)
           
static long currentTimeMillis()
          Overrideable method used to aid in simulation of time
 boolean deleteStudy()
          Deletes the study of the Inline Service containing the calling BatchJob, together with all its contained learning models and associated prediction models.
 boolean determineCG()
           
 int dumpStudy(boolean rewriteCompletedTimeWindows)
          Creates a snapshot of the study that is owned by the Inline Service containing the calling BatchJob.
 void forceLearning()
          Updates the in-memory learning models of all studies to include the latest available learnings, and persists the updated learning models to the database.
 com.sigmadynamics.batch.BatchAgent getBatchAgent()
           
protected static BatchAgentKernel getBatchAgentKernel()
          overrideable
 ChoiceGroupInterface getChoiceGroup(java.lang.String groupId)
          
 int getDataVersion()
           
 int getDeploymentState()
           
 int getDeploymentVersion()
           
protected static LearningRecordWriterFactory getLearningRecordWriterFactory()
          overrideable
 Metadata getMetadata()
           
 java.lang.String getName()
          Gets the application name.
 int getSessionCount()
           
 java.lang.String getStudyName()
          Get the application's study name.
 long getTimeLastLoaded()
           
 boolean isStoppedOrShuttingDown()
           
protected  PredictorInterface newPredictor(SDModelArray models, Path[] attributePaths, java.lang.String[] attributes)
          Overrideable
protected  RuleCache newRuleCache(java.lang.ClassLoader parent)
          Overrideable RuleCache factory
protected  RuleEvaluator newRuleEvaluator(ApplicationInterface app)
          Overrideable RuleEvaluator factory
 void rebuildPredictionModels()
          Rebuilds prediction models for all studies, so they include all recent learnings.
 void setTimeLastLoaded(long time)
           

 

Methods inherited from class com.sigmadynamics.sdo.support.SDOBase
getDescription, getSDOId, getSDOLabel, getSDOLabelOrId, setDescription, setSDOId, setSDOLabel

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface com.sigmadynamics.sdo.interfaces.ApplicationInterface
cleanUp, deleteChoiceHistory, deleteStatistics, flushStatistics, getDefaultChoices, init

 

Methods inherited from interface com.sigmadynamics.sdo.interfaces.client.SDOInterface
getDescription, getSDOId, getSDOLabel, getSDOLabelOrId

 

Field Detail

appFactory

protected final AppFactoryInterface appFactory

Method Detail

getLearningRecordWriterFactory

protected static LearningRecordWriterFactory getLearningRecordWriterFactory()
overrideable
Since:
3.0

getBatchAgentKernel

protected static BatchAgentKernel getBatchAgentKernel()
overrideable
Since:
3.0

getStudyName

public java.lang.String getStudyName()
Description copied from interface: ApplicationInterface
Get the application's study name.
Specified by:
getStudyName in interface ApplicationInterface
Since:
3.0

determineCG

public boolean determineCG()
Specified by:
determineCG in interface ApplicationInterface

calculateControlGroupStatus

protected boolean calculateControlGroupStatus(java.lang.String val,
                                              double percent)

calculateControlGroupStatus

protected boolean calculateControlGroupStatus(int val,
                                              double percent)

calculateControlGroupStatus

protected boolean calculateControlGroupStatus(long val,
                                              double percent)

calculateControlGroupStatus

protected boolean calculateControlGroupStatus(double val,
                                              double percent)

checkControlGroupStatus

protected boolean checkControlGroupStatus(boolean val)

checkControlGroupStatus

protected boolean checkControlGroupStatus(int val)

checkControlGroupStatus

protected boolean checkControlGroupStatus(java.lang.String val)

getSessionCount

public int getSessionCount()
Specified by:
getSessionCount in interface ApplicationInterface

isStoppedOrShuttingDown

public boolean isStoppedOrShuttingDown()
Specified by:
isStoppedOrShuttingDown in interface ApplicationInterface
Returns:
true if the app is stopped or in the process of shutting down

getName

public java.lang.String getName()
Description copied from interface: ApplicationInterface
Gets the application name.
Specified by:
getName in interface ApplicationInterface
Returns:
application name

getDeploymentVersion

public int getDeploymentVersion()
Specified by:
getDeploymentVersion in interface ApplicationInterface

getDeploymentState

public int getDeploymentState()
Specified by:
getDeploymentState in interface ApplicationInterface

getMetadata

public Metadata getMetadata()
Specified by:
getMetadata in interface ApplicationInterface

currentTimeMillis

public static long currentTimeMillis()
Overrideable method used to aid in simulation of time

Must be threadsafe.

Since:
1.0

getDataVersion

public int getDataVersion()
Specified by:
getDataVersion in interface ApplicationInterface

getChoiceGroup

public ChoiceGroupInterface getChoiceGroup(java.lang.String groupId)
Specified by:
getChoiceGroup in interface ApplicationInterface
See Also:
SDChoiceGroup.findChoiceGroup(String)

getBatchAgent

public com.sigmadynamics.batch.BatchAgent getBatchAgent()
Specified by:
getBatchAgent in interface ApplicationInterface

newPredictor

protected PredictorInterface newPredictor(SDModelArray models,
                                          Path[] attributePaths,
                                          java.lang.String[] attributes)
Overrideable
Since:
3.0

newRuleCache

protected RuleCache newRuleCache(java.lang.ClassLoader parent)
Overrideable RuleCache factory
Since:
3.0

newRuleEvaluator

protected RuleEvaluator newRuleEvaluator(ApplicationInterface app)
Overrideable RuleEvaluator factory
Since:
3.0

getTimeLastLoaded

public long getTimeLastLoaded()

setTimeLastLoaded

public void setTimeLastLoaded(long time)

deleteStudy

public boolean deleteStudy()
Description copied from interface: ApplicationInterface
Deletes the study of the Inline Service containing the calling BatchJob, together with all its contained learning models and associated prediction models.
Specified by:
deleteStudy in interface ApplicationInterface

dumpStudy

public int dumpStudy(boolean rewriteCompletedTimeWindows)
Description copied from interface: ApplicationInterface
Creates a snapshot of the study that is owned by the Inline Service containing the calling BatchJob.
Specified by:
dumpStudy in interface ApplicationInterface

forceLearning

public void forceLearning()
Description copied from interface: ApplicationInterface
Updates the in-memory learning models of all studies to include the latest available learnings, and persists the updated learning models to the database.
Specified by:
forceLearning in interface ApplicationInterface

rebuildPredictionModels

public void rebuildPredictionModels()
Description copied from interface: ApplicationInterface
Rebuilds prediction models for all studies, so they include all recent learnings.

This method asks the Learning Service to do the following sequence of activities, and returns after the sequence has finished.

  1. Process all previously unprocessed learning records, by reading them from the database and updating the in-memory learning models to reflect the knowledge encapsulated by the learning records.
  2. Persist the newly updated learning models to the database, for all studies.
  3. Rebuild all prediction models for all studies.
  4. Persist the new prediction models to the database.
  5. Wait for the new prediction models to be loaded into memory, where they will be available for making predictions.
Specified by:
rebuildPredictionModels in interface ApplicationInterface

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


Copyright © 2010, 2011, Oracle. All rights reserved.