Package com.basis.api.admin
Interface BBjAdminBBjReplicationJob
- All Superinterfaces:
BBjAdminCommitPropertyWriter
,BBjAdminCommitWriter
,BBjAdminPropertyReader
,BBjAdminPropertyWriter
,BBjAdminReplicationJob
,Remote
,Serializable
- All Known Subinterfaces:
BBjAdminBBjReplicationJob_1310
A single BBj replication job that will be added to the replication
system. This type of job contains a map of source files and/or directories from one
system to destination directories and/or files on the same system or another system.
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:
Java Sample
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();
BBj Sample
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()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
Fields inherited from interface com.basis.api.admin.BBjAdminReplicationJob
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, LOCAL, MAX_BANDWIDTH, NAME, RECOPY_ENABLED, STATE_COPYING_FILES, STATE_ERROR, STATE_NOT_SINCE_START, SYNCHRONOUS
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExclude
(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
(String p_source, String p_destination, boolean p_advisory, 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
(String p_source, String p_destination, String p_modes) Adds a source to destination replication mapping using the currently set advisory locking setting for the job.void
Clears all exclusions.void
Clears all of the current source/destination mappings.Returns a list of the excluded files and directories.Returns all of the mappings from source to destination locations.Returns the modes map for the specified source file.void
removeMapping
(String p_source) Removes the mapping that uses the specified source.Methods inherited from interface com.basis.api.admin.BBjAdminCommitPropertyWriter
getChangedProperties, getClearedProperties, getOriginalProperties
Methods inherited from interface com.basis.api.admin.BBjAdminCommitWriter
commit, rollback
Methods inherited from interface com.basis.api.admin.BBjAdminPropertyReader
checkValueEqual, contains, contains, getBoolean, getDouble, getInt, getList, getLong, getProperties, getString, getType, getTypes, getValue
Methods inherited from interface com.basis.api.admin.BBjAdminPropertyWriter
addType, canAddNewProperties, canClear, clear, clearProperties, clearProperty, getReadOnly, hasChanged, isReadOnly, setBoolean, setDouble, setInt, setList, setLong, setProperties, setString, setValue
Methods inherited from interface com.basis.api.admin.BBjAdminReplicationJob
cancelDisableWhenCaughtUpToNow, disableWhenCaughtUpToNow, getCurrentError, getDescriptiveProperties, getLastInSync, getLastInSyncString, getLastLag, getLastOpRate, getLastTimestamp, getLastTimestampRatio, getLastTimestampSummary, getLastWaitForLog, getStartProcesses, setDescriptiveProperties, setEnabled, waitingToDisable
-
Field Details
-
HOST
- See Also:
-
PORT
- See Also:
-
SSL
- See Also:
-
USER
- See Also:
-
PASSWORD
- See Also:
-
-
Method Details
-
addJob
Tells the job to add itself to the replication job list.- Throws:
BBjAdminException
-
addMapping
void addMapping(String p_source, String p_destination, boolean p_advisory, String p_modes) throws BBjAdminException Adds a source to destination replication mapping using a possibly different advisory locking setting than that set for the job.- Parameters:
p_source
-p_destination
-p_advisory
-p_modes
- TODO- Throws:
BBjAdminException
-
addMapping
Adds a source to destination replication mapping using the currently set advisory locking setting for the job.- Parameters:
p_source
-p_destination
-p_modes
-- Throws:
BBjAdminException
-
addExclude
Adds a file to the list of files to exclude from replication.- Parameters:
p_source
-- Throws:
BBjAdminException
-
getExclusions
Returns a list of the excluded files and directories.- Throws:
BBjAdminException
-
removeMapping
Removes the mapping that uses the specified source.- Parameters:
p_source
-- Throws:
BBjAdminException
-
getMappings
Returns all of the mappings from source to destination locations.- Throws:
BBjAdminException
-
clearMappings
Clears all of the current source/destination mappings.- Throws:
BBjAdminException
-
getModes
Returns the modes map for the specified source file. If there are no modes available or if the file is not valid, it returns null.- Parameters:
p_source
-- Throws:
BBjAdminException
-
clearExclusions
Clears all exclusions.- Throws:
BBjAdminException
-