Package com.tailf.maapi
Class CommitParams
Object
com.tailf.maapi.CommitParams
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet commit queue error option.Get commit queue synchronous mode of operation custom timeout.Get commit-queue tag.Get the outformat to produce when committing with dry-run.Get the the trace id for the transaction.String[]
Deprecated.boolean
Get commit queue asynchronous mode of operation.boolean
Check if the commit queue item is atomic.boolean
Check if the the commit queue item block other commit queue items for these devices.boolean
Check if the commit should bypass the commit queue, i.e.boolean
Check if the commit queue item is locked.boolean
Check if the commit queue item is non-atomic.boolean
Get commit queue synchronous mode of operation.boolean
isDryRun()
Check if dry-run is enabled.boolean
Check if the dry-run should produce a reverse diff.boolean
Check if service's create method should be invoked or not.boolean
isNoLsa()
Get no-lsa commit parameter.boolean
Check if the configuration should only be written to CDB, not actually pushed to the device.boolean
boolean
boolean
Check if no-revision-drop commit parameter is set.boolean
Get reconcile commit parameter with discard-non-service-config option.boolean
Get reconcile commit parameter with keep-non-service-config option.boolean
isUseLsa()
Get use-lsa commit parameter.void
Set commit queue asynchronous mode of operation.void
Make the commit queue item atomic.void
Make the commit queue item block other commit queue items for these devices.void
Make the commit transactional even if commit queue is default.void
Set commit queue error option.void
Make the commit queue item locked.void
Make the commit queue item non-atomic.void
Set commit queue synchronous mode of operation.void
setCommitQueueSync
(int timeout) Set commit queue synchronous mode of operation with custom timeout.void
setCommitQueueTag
(String tag) Set commit-queue tag.void
Commit with dry-run outformat CLI.void
Commit with dry-run outformat cli-c.void
Commit with dry-run outformat cli-c reverse.void
Commit with dry-run outformat native.void
Commit with dry-run outformat native reverse.void
setDryRunOutformat
(CommitParams.DryRunOutformat outformat) Set the outformat to produce when committing with dry-run.void
Make dry-run produce a reverse diff.void
Commit with dry-run outformat XML.void
Do not invoke service's create method.void
setNoLsa()
Set no-lsa commit parameter.void
Only write the configuration to CDB, do not actually push it to the device.void
Do not check device sync state before pushing the configuration change.void
Check that the parts of the device configuration to be modified are are up-to-date in CDB before pushing the configuration change to the device.void
Set no-revision-drop commit parameter.void
Set reconcile commit parameter with discard-non-service-config option.void
Set reconcile commit parameter with keep-non-service-config option.void
setTraceId
(String traceId) Set the trace id for the transaction.void
Set use-lsa commit parameter.void
setWaitDevice
(String[] devices) Deprecated.This is now done automatically for all devices part of the transaction.toString()
-
Constructor Details
-
CommitParams
public CommitParams() -
CommitParams
-
-
Method Details
-
setCommitQueueAsync
public void setCommitQueueAsync()Set commit queue asynchronous mode of operation. -
isCommitQueueAsync
public boolean isCommitQueueAsync()Get commit queue asynchronous mode of operation.- Returns:
- true if the mode of operation is asynchronous, false otherwise.
-
setCommitQueueSync
public void setCommitQueueSync()Set commit queue synchronous mode of operation. -
isCommitQueueSync
public boolean isCommitQueueSync()Get commit queue synchronous mode of operation.- Returns:
- true if the mode of operation is synchronous, false otherwise.
-
setCommitQueueSync
public void setCommitQueueSync(int timeout) Set commit queue synchronous mode of operation with custom timeout.- Parameters:
timeout
- Timeout in seconds. -1 means infinity.
-
getCommitQueueSyncTimeout
Get commit queue synchronous mode of operation custom timeout.- Returns:
- The timeout in seconds. -1 means infinity. If no value has been set null is returned.
-
setCommitQueueBypass
public void setCommitQueueBypass()Make the commit transactional even if commit queue is default. -
isCommitQueueBypass
public boolean isCommitQueueBypass()Check if the commit should bypass the commit queue, i.e. it is transactional even though commit queue is the default.- Returns:
- true if the commit queue should be bypassed, false otherwise.
-
setCommitQueueTag
Set commit-queue tag. Implicitly enabled commit-queue commit.- Parameters:
tag
- User defined opaque tag attached to the resulting queue item if using theMaapi.COMMIT_NCS_COMMIT_QUEUE_ASYNC
orMaapi.COMMIT_NCS_COMMIT_QUEUE_SYNC
flag. The tag is present in all notifications and events sent referencing the queue item.
-
getCommitQueueTag
Get commit-queue tag.- Returns:
- The commit-queue tag, or null if there is no tag.
-
setCommitQueueLock
public void setCommitQueueLock()Make the commit queue item locked. Locked commit queue item needs to be unlocked before it can proceed. -
isCommitQueueLock
public boolean isCommitQueueLock()Check if the commit queue item is locked.- Returns:
- true if it is locked, false otherwise.
-
setCommitQueueBlockOthers
public void setCommitQueueBlockOthers()Make the commit queue item block other commit queue items for these devices. -
isCommitQueueBlockOthers
public boolean isCommitQueueBlockOthers()Check if the the commit queue item block other commit queue items for these devices. -
setCommitQueueAtomic
public void setCommitQueueAtomic()Make the commit queue item atomic. -
isCommitQueueAtomic
public boolean isCommitQueueAtomic()Check if the commit queue item is atomic.- Returns:
- true if it is atomic, false if it isn't.
-
setCommitQueueNonAtomic
public void setCommitQueueNonAtomic()Make the commit queue item non-atomic. -
isCommitQueueNonAtomic
public boolean isCommitQueueNonAtomic()Check if the commit queue item is non-atomic.- Returns:
- true if it is non-atomic, false if it isn't.
-
setCommitQueueErrorOption
Set commit queue error option.- Parameters:
errorOption
-
-
getCommitQueueErrorOption
Get commit queue error option.- Returns:
- The error option or null if not set.
-
setNoRevisionDrop
public void setNoRevisionDrop()Set no-revision-drop commit parameter. -
isNoRevisionDrop
public boolean isNoRevisionDrop()Check if no-revision-drop commit parameter is set.- Returns:
- true if it is set, false otherwise.
-
setNoNetworking
public void setNoNetworking()Only write the configuration to CDB, do not actually push it to the device. -
isNoNetworking
public boolean isNoNetworking()Check if the configuration should only be written to CDB, not actually pushed to the device.- Returns:
- true if the configuration should not be pused to the device, false otherwise.
-
setNoOverwrite
public void setNoOverwrite()Check that the parts of the device configuration to be modified are are up-to-date in CDB before pushing the configuration change to the device. -
isNoOverwrite
public boolean isNoOverwrite() -
setNoOutOfSyncCheck
public void setNoOutOfSyncCheck()Do not check device sync state before pushing the configuration change. -
isNoOutOfSyncCheck
public boolean isNoOutOfSyncCheck() -
setNoLsa
public void setNoLsa()Set no-lsa commit parameter. -
isNoLsa
public boolean isNoLsa()Get no-lsa commit parameter.- Returns:
- true if set, false otherwise.
-
setUseLsa
public void setUseLsa()Set use-lsa commit parameter. -
isUseLsa
public boolean isUseLsa()Get use-lsa commit parameter.- Returns:
- true if set, false otherwise.
-
setNoDeploy
public void setNoDeploy()Do not invoke service's create method. -
isNoDeploy
public boolean isNoDeploy()Check if service's create method should be invoked or not.- Returns:
- true if it should be invoked, false otherwise.
-
setReconcileKeepNonServiceConfig
public void setReconcileKeepNonServiceConfig()Set reconcile commit parameter with keep-non-service-config option. -
isReconcileKeepNonServiceConfig
public boolean isReconcileKeepNonServiceConfig()Get reconcile commit parameter with keep-non-service-config option.- Returns:
- true if set false otherwise.
-
setReconcileDiscardNonServiceConfig
public void setReconcileDiscardNonServiceConfig()Set reconcile commit parameter with discard-non-service-config option. -
isReconcileDiscardNonServiceConfig
public boolean isReconcileDiscardNonServiceConfig()Get reconcile commit parameter with discard-non-service-config option.- Returns:
- true if set, false otherwise.
-
isDryRun
public boolean isDryRun()Check if dry-run is enabled.- Returns:
- true if dry-run is enabled, false otherwise.
-
setDryRunOutformat
Set the outformat to produce when committing with dry-run.- Parameters:
outformat
- The outformat to produce.
-
getDryRunOutformat
Get the outformat to produce when committing with dry-run.- Returns:
- The outformat to produce or null if not set.
-
setDryRunReverse
public void setDryRunReverse()Make dry-run produce a reverse diff. -
isDryRunReverse
public boolean isDryRunReverse()Check if the dry-run should produce a reverse diff.- Returns:
- true if the produced diff should be reverse, false otherwise.
-
setDryRunXml
public void setDryRunXml()Commit with dry-run outformat XML. -
setDryRunCli
public void setDryRunCli()Commit with dry-run outformat CLI. -
setDryRunNative
public void setDryRunNative()Commit with dry-run outformat native. -
setDryRunCliC
public void setDryRunCliC()Commit with dry-run outformat cli-c. -
setDryRunNativeReverse
public void setDryRunNativeReverse()Commit with dry-run outformat native reverse. -
setDryRunCliCReverse
public void setDryRunCliCReverse()Commit with dry-run outformat cli-c reverse. -
setWaitDevice
Deprecated.This is now done automatically for all devices part of the transaction.Wait for device lock before entering transaction critical section. -
getWaitDevice
Deprecated.Get the devices that we need to wait for a device lock for before entering transaction critical section.- Returns:
- An array of device names.
-
getTraceId
Get the the trace id for the transaction.- Returns:
- The the trace id.
-
setTraceId
Set the trace id for the transaction.- Parameters:
traceId
- The trace id to use for the transaction.
-
getConfXMLParam
-
toString
-