Class TransactionsMXBeanImpl

    • Constructor Detail

      • TransactionsMXBeanImpl

        public TransactionsMXBeanImpl​(GridKernalContext ctx)
        Parameters:
        ctx - Context.
    • Method Detail

      • getActiveTransactions

        public String getActiveTransactions​(Long minDuration,
                                            Integer minSize,
                                            String prj,
                                            String consistentIds,
                                            String xid,
                                            String lbRegex,
                                            Integer limit,
                                            String order,
                                            boolean detailed,
                                            boolean kill)
        Specified by:
        getActiveTransactions in interface TransactionsMXBean
        Parameters:
        minDuration - Minimum duration.
        minSize - Minimum size.
        prj - Projection.
        consistentIds - Consistent ids.
        xid - Xid.
        lbRegex - Label regex.
        limit - Limit.
        order - Order.
        detailed - Detailed.
        kill - Kill.
        Returns:
        If detailed flag is set - description of each transaction, else transactions count.
        See Also:
        CommandMBean
      • getTxOwnerDumpRequestsAllowed

        public boolean getTxOwnerDumpRequestsAllowed()
        Shows if dump requests from local node to near node are allowed, when long running transaction is found. If allowed, the compute request to near node will be made to get thread dump of transaction owner thread.
        Specified by:
        getTxOwnerDumpRequestsAllowed in interface TransactionsMXBean
        Returns:
        true if allowed, false otherwise.
      • setTxOwnerDumpRequestsAllowed

        public void setTxOwnerDumpRequestsAllowed​(boolean allowed)
        Sets if dump requests from local node to near node are allowed, when long running transaction is found. If allowed, the compute request to near node will be made to get thread dump of transaction owner thread.
        Specified by:
        setTxOwnerDumpRequestsAllowed in interface TransactionsMXBean
        Parameters:
        allowed - whether to allow
      • getLongTransactionTimeDumpThreshold

        public long getLongTransactionTimeDumpThreshold()
        Returns threshold timeout in milliseconds for long transactions, if transaction exceeds it, it will be dumped in log with information about how much time did it spent in system time (time while aquiring locks, preparing, commiting, etc.) and user time (time when client node runs some code while holding transaction). Returns 0 if not set. No transactions are dumped in log if this parameter is not set.
        Specified by:
        getLongTransactionTimeDumpThreshold in interface TransactionsMXBean
        Returns:
        Threshold.
      • setLongTransactionTimeDumpThreshold

        public void setLongTransactionTimeDumpThreshold​(long threshold)
        Sets threshold timeout in milliseconds for long transactions, if transaction exceeds it, it will be dumped in log with information about how much time did it spent in system time (time while aquiring locks, preparing, commiting, etc.) and user time (time when client node runs some code while holding transaction). Can be set to 0 - no transactions will be dumped in log in this case.
        Specified by:
        setLongTransactionTimeDumpThreshold in interface TransactionsMXBean
        Parameters:
        threshold - Threshold.
      • getTransactionTimeDumpSamplesCoefficient

        public double getTransactionTimeDumpSamplesCoefficient()
        Returns the coefficient for samples of completed transactions that will be dumped in log.
        Specified by:
        getTransactionTimeDumpSamplesCoefficient in interface TransactionsMXBean
        Returns:
        Coefficient current value.
      • setTransactionTimeDumpSamplesCoefficient

        public void setTransactionTimeDumpSamplesCoefficient​(double coefficient)
        Sets the coefficient for samples of completed transactions that will be dumped in log.
        Specified by:
        setTransactionTimeDumpSamplesCoefficient in interface TransactionsMXBean
        Parameters:
        coefficient - Coefficient.
      • setLongOperationsDumpTimeout

        public void setLongOperationsDumpTimeout​(long timeout)
        Setting a timeout (in millis) for printing long-running transactions as well as transactions that cannot receive locks for all their keys for a long time. Set less than or equal 0 to disable.
        Specified by:
        setLongOperationsDumpTimeout in interface TransactionsMXBean
        Parameters:
        timeout - Timeout.
      • getLongOperationsDumpTimeout

        public long getLongOperationsDumpTimeout()
        Returns a timeout (in millis) for printing long-running transactions as well as transactions that cannot receive locks for all their keys for a long time. Returns 0 or less if not set.
        Specified by:
        getLongOperationsDumpTimeout in interface TransactionsMXBean
        Returns:
        Timeout.
      • setTxKeyCollisionsInterval

        public void setTxKeyCollisionsInterval​(int timeout)
        Set timeout interval for tx key contention analysis.
        Specified by:
        setTxKeyCollisionsInterval in interface TransactionsMXBean
        Parameters:
        timeout - Interval in millis.