Interface BBjAdminReplicationJob

All Superinterfaces:
BBjAdminCommitPropertyWriter, BBjAdminCommitWriter, BBjAdminPropertyReader, BBjAdminPropertyWriter, Remote, Serializable
All Known Subinterfaces:
BBjAdminAsynchTriggerJob, BBjAdminAuditReplicationJob, BBjAdminBBjReplicationJob, BBjAdminBBjReplicationJob_1310, BBjAdminSQLReplicationJob

public interface BBjAdminReplicationJob extends BBjAdminCommitPropertyWriter, Serializable
A single replication job configured on the source server. See BBjAdminReplicationTarget for information about the target side of a replication job. The most common type of replication job is a BBjAdminBBjReplicationJob. See this extension of this interface for more information and sample code.
  • Field Details

    • NAME

      static final String NAME
      Name of the replication job. Also used by BBjAdminAsynchTriggerJob which extends this interface.
      See Also:
    • LOCAL

      static final String LOCAL
      Are the source and target for the replication job on the same machine?
      See Also:
    • ID

      static final String ID
      Unique ID for this job.
      See Also:
    • SYNCHRONOUS

      @Deprecated static final String SYNCHRONOUS
      Deprecated.
      This option will eventually be removed. There is no time that anyone should use this option. If this functionality is required, consider implementing the functionality using triggers. True if the job should operate in a synchronous fashion. NOTE: This should almost always be set to FALSE. Synchronous means that file operations will wait for the replication operation to finish. Typically you want replication operations to occur in the background so it doesn't hold up file operations. Setting to true can significantly slow down file performance.
      See Also:
    • ENABLED

      static final String ENABLED
      True if the job is currently enabled/running. False if disabled/paused.
      See Also:
    • ADVISORY_LOCKING

      static final String ADVISORY_LOCKING
      True if the job should use advisory locking when accessing the data files.
      See Also:
    • MAX_BANDWIDTH

      static final String MAX_BANDWIDTH
      Maximum bandwidth this job should use communicating with the target.
      See Also:
    • RECOPY_ENABLED

      static final String RECOPY_ENABLED
      True if recopy of file is enabled. A recopy occurs when a replication job determines that the target file is in a state where it is no longer synchronized properly with the source job and the source file needs to be recopied to the target in its entirety. Disabling this stops this from occurring. This is typically used in cases where recopying continues to occur but you can't determine why and so you disable it for a short period until you determine the cause and fix it.
      See Also:
    • EVENT_HANDLER

      @Deprecated static final String EVENT_HANDLER
      Deprecated.
      See Also:
    • EVENT_HANDLER_USER

      @Deprecated static final String EVENT_HANDLER_USER
      Deprecated.
      See Also:
    • EVENT_HANDLER_PWD

      @Deprecated static final String EVENT_HANDLER_PWD
      Deprecated.
      See Also:
    • EVENT_HANDLER_CONFIG

      @Deprecated static final String EVENT_HANDLER_CONFIG
      Deprecated.
      See Also:
    • EVENT_HANDLER_WORKING_DIR

      @Deprecated static final String EVENT_HANDLER_WORKING_DIR
      Deprecated.
      See Also:
    • EVENT_HANDLER_CLASSPATH

      @Deprecated static final String EVENT_HANDLER_CLASSPATH
      Deprecated.
      See Also:
    • EVENT_EMAIL_SERVICE

      @Deprecated static final String EVENT_EMAIL_SERVICE
      Deprecated.
      See Also:
    • EVENT_EMAIL_RECIPIENTS

      @Deprecated static final String EVENT_EMAIL_RECIPIENTS
      Deprecated.
      See Also:
    • STATE_COPYING_FILES

      static final int STATE_COPYING_FILES
      State of the job indicating it is currently copying files from the source to the target. See getLastInSync().
      See Also:
    • STATE_NOT_SINCE_START

      static final int STATE_NOT_SINCE_START
      State of the job indicating it is not yet up to date since starting the job initially. See getLastInSync().
      See Also:
    • STATE_ERROR

      static final int STATE_ERROR
      State of the job indicating it currently has an error condition. See getLastInSync().
      See Also:
  • Method Details

    • getLastWaitForLog

      long getLastWaitForLog() throws BBjAdminException
      Returns the last time that the replication process had to wait for the log to catch up to the queue. This basically tells you when the last time the replication process was not completely synchronized with the destination.
      Throws:
      BBjAdminException
    • getLastTimestamp

      long getLastTimestamp() throws BBjAdminException
      Returns the last timestamp processed by the replication log. This indicates the point in the replication log that has been processed. This is more useful for determining progress than getLastWaitForLog().
      Throws:
      BBjAdminException
    • getLastInSync

      long getLastInSync() throws BBjAdminException
      Returns the last time this job was in sync. If value is < 0, then the value refers to a state code of STATE_COPYING_FILES, STATE_NOT_SINCE_START, or STATE_ERROR.
      Throws:
      BBjAdminException
    • getLastInSyncString

      String getLastInSyncString() throws BBjAdminException
      Returns the last time this job was in sync as a date/time formatted using the specified locale of the BBjAdminBase. If it is not in sync, string contains a message with the reason.
      Throws:
      BBjAdminException
    • disableWhenCaughtUpToNow

      void disableWhenCaughtUpToNow() throws BBjAdminException
      Tells the job to pause when the job is completely caught up on the target with the items currently in the source log file as of the moment this method is called.
      Throws:
      BBjAdminException
    • cancelDisableWhenCaughtUpToNow

      boolean cancelDisableWhenCaughtUpToNow() throws BBjAdminException
      Tells the job to cancel the pause request that was made in a call to disableWhenCaughtUpToNow() if one was made. Returns true if it actually cancelled something.
      Throws:
      BBjAdminException
    • waitingToDisable

      long waitingToDisable() throws BBjAdminException
      Returns the timestamp as a standard Java long value, for when the call was made to disableWhenCaughtUpToNow(). If it is not waiting, it returns -1.
      Throws:
      BBjAdminException
    • getStartProcesses

      Returns a list of all files that are currently being copied from source to destination machine.
      Throws:
      BBjAdminException
    • getCurrentError

      Throwable getCurrentError() throws BBjAdminException
      If there is any kind of problem experienced by the replication job, this will return that current error. If there are no problems, it returns null.
      Throws:
      BBjAdminException
    • setEnabled

      void setEnabled(boolean p_enabled) throws BBjAdminException
      Sets the job enabled/disabled.
      Throws:
      BBjAdminException
    • getDescriptiveProperties

      BBjAdminList<BBjAdminProperty> getDescriptiveProperties() throws BBjAdminException
      Used primarily by GUI applications like the Enterprise Manager to dynamically generate an admin UI. To get property values for general purposes, you should call the getXXX() methods.
      Returns:
      BBjAdminList containing BBjAdminProperty objects for each available property.
      Throws:
      BBjAdminException
    • setDescriptiveProperties

      void setDescriptiveProperties(BBjAdminList<BBjAdminProperty> p_descriptiveProps) throws BBjAdminException
      Used primarily by GUI applications like the Enterprise Manager to dynamically generate an admin UI. To set property values for general purposes, you should call the setXXX() methods.
      Throws:
      BBjAdminException
    • getLastOpRate

      double getLastOpRate() throws BBjAdminException
      Get the number of operations per ms processed in the last successful timestamp interval.
      Throws:
      BBjAdminException
    • getLastTimestampRatio

      double getLastTimestampRatio() throws BBjAdminException
      Get the relative replication log processing rate as of the last timestamp successfully processed. That is the ratio of elapsed replication log time to wall time. This means that if the target is processing 2 minutes worth of logs per 2 minutes of wall time then the ratio is about 1. If the target is falling behind then the ratio is somewhere between 0 and 1 (lower is slower). If it is catching up then the ratio is greater than 1.
      Throws:
      BBjAdminException
    • getLastLag

      long getLastLag() throws BBjAdminException
      The number of milliseconds that the timestamp lagged behind wall time as of the last timestamp. Not significant if fairly small.
      Throws:
      BBjAdminException
    • getLastTimestampSummary

      String getLastTimestampSummary() throws BBjAdminException
      Get a string summarizing interesting stats as of the last timestamp.
      Throws:
      BBjAdminException