Class CommitParams

Object
com.tailf.maapi.CommitParams

public class CommitParams extends Object
  • Constructor Details

    • CommitParams

      public CommitParams()
    • CommitParams

      public CommitParams(ConfResponse result)
  • 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

      public Long 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

      public void setCommitQueueTag(String tag)
      Set commit-queue tag. Implicitly enabled commit-queue commit.
      Parameters:
      tag - User defined opaque tag attached to the resulting queue item if using the Maapi.COMMIT_NCS_COMMIT_QUEUE_ASYNC or Maapi.COMMIT_NCS_COMMIT_QUEUE_SYNC flag. The tag is present in all notifications and events sent referencing the queue item.
    • getCommitQueueTag

      public String 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

      public void setCommitQueueErrorOption(CommitParams.CommitQueueErrorOption errorOption)
      Set commit queue error option.
      Parameters:
      errorOption -
    • getCommitQueueErrorOption

      public CommitParams.CommitQueueErrorOption 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

      public void setDryRunOutformat(CommitParams.DryRunOutformat outformat)
      Set the outformat to produce when committing with dry-run.
      Parameters:
      outformat - The outformat to produce.
    • getDryRunOutformat

      public CommitParams.DryRunOutformat 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 public void setWaitDevice(String[] devices)
      Deprecated.
      This is now done automatically for all devices part of the transaction.
      Wait for device lock before entering transaction critical section.
    • getWaitDevice

      @Deprecated public String[] 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

      public String getTraceId()
      Get the the trace id for the transaction.
      Returns:
      The the trace id.
    • setTraceId

      public void setTraceId(String traceId)
      Set the trace id for the transaction.
      Parameters:
      traceId - The trace id to use for the transaction.
    • getConfXMLParam

      public List<ConfXMLParam> getConfXMLParam()
    • toString

      public String toString()
      Overrides:
      toString in class Object