public interface BBjAdminBBjReplicationJob extends BBjAdminReplicationJob
The following code sample shows how to interact with a BBjAdminBBjReplicationJob to get its enabled status as well as find out if there is currently an error condition on the job:
import com.basis.api.admin.BBjAdminBase;
import com.basis.api.admin.BBjAdminFactory;
import com.basis.api.admin.BBjAdminList;
import com.basis.api.admin.BBjAdminReplicationJob;
...
// Get the API instance
BBjAdminBase api = BBjAdminFactory.getBBjAdmin(InetAddress.getByName("myserver"), 2002, true, "admin", "mypassword");
// Get the list of replication jobs
BBjAdminList jobList = api.getReplicationJobs();
// Check each job to see if an error is present on any of them.
for (int j = 0; j < jobList.size(); j++) {
BBjAdminReplicationJob job = jobList.get(j);
String jobName = job.getString(BBjAdminReplicationJob.NAME);
if (!job.getBoolean(BBjAdminReplicationJob.ENABLED)) {
System.out.println("Job " + jobName + " is not currently enabled.");
}
if (job.getCurrentError() != null) {
System.out.println("Job " + jobName + " currently has a problem: " + job.getCurrentError().getMessage());
}
}
// Release the API instance
api.release();
REM Get the API instance
api! = BBjAdminFactory.getBBjAdmin("admin", "admin123")
REM Get the list of replication jobs
jobList! = api!.getReplicationJobs()
REM Check each job to see if an error is present on any of them.
for j = 0 to jobList!.size() - 1
job! = jobList!.get(j)
jobName$ = job!.getString(BBjAdminReplicationJob.NAME)
if job!.getBoolean(BBjAdminReplicationJob.ENABLED) = 0 then
PRINT "Job " + jobName$ + " is not currently enabled."
endif
if job!.getCurrentError() <> NULL() then
PRINT "Job " + jobName$ + " currently has a problem: " + job!.getCurrentError().getMessage()
endif
next j
REM Release the API instance.
api!.release()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HOST |
static java.lang.String |
PASSWORD |
static java.lang.String |
PORT |
static java.lang.String |
SSL |
static java.lang.String |
USER |
ADVISORY_LOCKING, ENABLED, EVENT_EMAIL_RECIPIENTS, EVENT_EMAIL_SERVICE, EVENT_HANDLER, EVENT_HANDLER_CLASSPATH, EVENT_HANDLER_CONFIG, EVENT_HANDLER_PWD, EVENT_HANDLER_USER, EVENT_HANDLER_WORKING_DIR, ID, MAX_BANDWIDTH, NAME, RECOPY_ENABLED, STATE_COPYING_FILES, STATE_ERROR, STATE_NOT_SINCE_START, SYNCHRONOUS
Modifier and Type | Method and Description |
---|---|
void |
addExclude(java.lang.String p_source)
Adds a file to the list of files to exclude from replication.
|
void |
addJob()
Tells the job to add itself to the replication job list.
|
void |
addMapping(java.lang.String p_source,
java.lang.String p_destination,
boolean p_advisory,
java.lang.String p_modes)
Adds a source to destination replication mapping using a possibly different advisory locking
setting than that set for the job.
|
void |
addMapping(java.lang.String p_source,
java.lang.String p_destination,
java.lang.String p_modes)
Adds a source to destination replication mapping using the currently set advisory locking setting
for the job.
|
void |
clearExclusions()
Clears all exclusions.
|
void |
clearMappings()
Clears all of the current source/destination mappings.
|
java.util.List<java.lang.String> |
getExclusions()
Returns a list of the excluded files and directories.
|
BBjAdminMap<java.lang.String,java.lang.String> |
getMappings()
Returns all of the mappings from source to destination locations.
|
java.util.Map<java.lang.String,java.lang.String> |
getModes(java.lang.String p_source)
Returns the modes map for the specified source file.
|
void |
removeMapping(java.lang.String p_source)
Removes the mapping that uses the specified source.
|
cancelDisableWhenCaughtUpToNow, disableWhenCaughtUpToNow, getCurrentError, getDescriptiveProperties, getLastInSync, getLastInSyncString, getLastLag, getLastOpRate, getLastTimestamp, getLastTimestampRatio, getLastTimestampSummary, getLastWaitForLog, getStartProcesses, setDescriptiveProperties, setEnabled, waitingToDisable
getChangedProperties, getClearedProperties, getOriginalProperties
addType, canAddNewProperties, canClear, clear, clearProperties, clearProperty, getReadOnly, hasChanged, isReadOnly, setBoolean, setDouble, setInt, setList, setLong, setProperties, setString, setValue
checkValueEqual, contains, contains, getBoolean, getDouble, getInt, getList, getLong, getProperties, getString, getType, getTypes, getValue
commit, rollback
static final java.lang.String HOST
static final java.lang.String PORT
static final java.lang.String SSL
static final java.lang.String USER
static final java.lang.String PASSWORD
void addJob() throws BBjAdminException
BBjAdminException
void addMapping(java.lang.String p_source, java.lang.String p_destination, boolean p_advisory, java.lang.String p_modes) throws BBjAdminException
p_source
- p_destination
- p_advisory
- p_modes
- TODOBBjAdminException
void addMapping(java.lang.String p_source, java.lang.String p_destination, java.lang.String p_modes) throws BBjAdminException
p_source
- p_destination
- p_modes
- BBjAdminException
void addExclude(java.lang.String p_source) throws BBjAdminException
p_source
- BBjAdminException
java.util.List<java.lang.String> getExclusions() throws BBjAdminException
BBjAdminException
void removeMapping(java.lang.String p_source) throws BBjAdminException
p_source
- BBjAdminException
BBjAdminMap<java.lang.String,java.lang.String> getMappings() throws BBjAdminException
BBjAdminException
void clearMappings() throws BBjAdminException
BBjAdminException
java.util.Map<java.lang.String,java.lang.String> getModes(java.lang.String p_source) throws BBjAdminException
p_source
- BBjAdminException
void clearExclusions() throws BBjAdminException
BBjAdminException