Interface D3Broadcast


  • public interface D3Broadcast
    The broadcast handler contains the information used in the broadcast distributed transaction.

    This object is created using one the following methods:

    When created, the broadcast handler can be used in the method broadcast().

    This object contains information about the broadcast operation, such as:

    • Synchronization mode:
      • if synchronous: after launching the broadcast operation, the method waits for the end of broadcast notification
      • if asynchronous: the method only queues the broadcast operation without waiting for the end of the operation
    • Operation time out: if in synchronized mode, this corresponds to the time out of the operation (no effect on the broadcast). If this object is not notified when the time out is reached, the broadcast method throws an OperationException.
    • VersionKey of the delivery dataspace to broadcast.
    • Delivery status of the broadcast operation.
    • Message of the broadcast operation.
    • Stack trace on operation failure.

    See Broadcast for more information.

    Since:
    5.2.7
    • Method Detail

      • setOperationTimeOut

        void setOperationTimeOut​(long aOperationTimeOut)
        Sets the operation time out. Ignored if the synchronization mode is asynchronous.
        Parameters:
        aOperationTimeOut - in milliseconds.
        Throws:
        IllegalArgumentException - if aOperationTimeOut is negative.
      • getOperationTimeOut

        long getOperationTimeOut()
        Returns the operation time-out in milliseconds. If the synchronization mode is asynchronous, returns -1.
      • getVersionKey

        VersionKey getVersionKey()
        Returns the VersionKey of the snapshot to broadcast.
      • getDeliveryModes

        List<DeliveryMode> getDeliveryModes()
        Returns a list of delivery modes used in this broadcast handler.
        Since:
        5.4.0
      • getDeliveryStatus

        D3Broadcast.Status getDeliveryStatus​(DeliveryMode aDeliveryMode)
        Global delivery status depending on the delivery mode ('Cluster' or 'Federation').
        If the broadcast operation is waiting for its turn:
        • returns 'Not initialized' status regardless of the delivery mode
        If the delivery mode in the parameter is not relevant:
        Since:
        5.4.0
      • isFullResync

        boolean isFullResync()
        Returns true if the operation is full resynchronization concerned. Otherwise, returns false.
        Since:
        5.5.1
      • getMessage

        String getMessage()
        Returns the message of the broadcast operation.
      • getStackTrace

        String getStackTrace()
        Returns the stack trace of the broadcast operation if it failed. Otherwise, returns null.