test_class.declarator: testLog
test_class.modifier: private static
test_class.original_string: private static ListeningTestLogger testLog;
test_class.type: ListeningTestLogger
test_class.var_name: testLog
test_class.declarator: clientNode
test_class.modifier: private
test_class.original_string: private boolean clientNode;
test_class.type: boolean
test_class.var_name: clientNode
test_class.file: modules/core/src/test/java/org/apache/ignite/internal/TransactionsMXBeanImplTest.java
test_class.identifier: TransactionsMXBeanImplTest
test_class.superclass: extends GridCommonAbstractTest
test_case.body: @Test
      public void testBasic() throws Exception {
          IgniteEx ignite = startGrid(0);
  
          TransactionsMXBean bean = txMXBean(0);
  
          ignite.transactions().txStart();
  
          ignite.cache(DEFAULT_CACHE_NAME).put(0, 0);
  
          String res = bean.getActiveTransactions(null, null, null, null, null, null, null, null, false, false);
  
          assertEquals("1", res);
  
          res = bean.getActiveTransactions(null, null, null, null, null, null, null, null, true, false);
  
          assertTrue(res.indexOf("Tx:") > 0);
  
          res = bean.getActiveTransactions(null, null, null, null, null, null, null, null, false, true);
  
          assertEquals("1", res);
  
          doSleep(500);
  
          res = bean.getActiveTransactions(null, null, null, null, null, null, null, null, false, false);
  
          assertEquals("0", res);
      }
test_case.class_method_signature: TransactionsMXBeanImplTest.testBasic()
test_case.full_signature: @Test public void testBasic()
test_case.identifier: testBasic
test_case.invocations: startGrid txMXBean txStart transactions put cache getActiveTransactions assertEquals getActiveTransactions assertTrue indexOf getActiveTransactions assertEquals doSleep getActiveTransactions assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBasic()
focal_class.declarator: ctx
focal_class.modifier: private final
focal_class.original_string: private final GridKernalContextImpl ctx;
focal_class.type: GridKernalContextImpl
focal_class.var_name: ctx
focal_class.file: modules/core/src/main/java/org/apache/ignite/internal/TransactionsMXBeanImpl.java
focal_class.identifier: TransactionsMXBeanImpl
focal_class.interfaces: implements TransactionsMXBean
focal_class.class_method_signature: TransactionsMXBeanImpl.TransactionsMXBeanImpl(GridKernalContextImpl ctx)
focal_class.full_signature: public  TransactionsMXBeanImpl(GridKernalContextImpl ctx)
focal_class.identifier: TransactionsMXBeanImpl
focal_class.modifiers: public
focal_class.parameters: (GridKernalContextImpl ctx)
focal_class.signature:  TransactionsMXBeanImpl(GridKernalContextImpl ctx)
focal_class.class_method_signature: TransactionsMXBeanImpl.getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_class.full_signature: @Override public String getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_class.identifier: getActiveTransactions
focal_class.modifiers: @Override public
focal_class.parameters: (Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_class.return: String
focal_class.signature: String getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_class.class_method_signature: TransactionsMXBeanImpl.getTxTimeoutOnPartitionMapExchange()
focal_class.full_signature: @Override public long getTxTimeoutOnPartitionMapExchange()
focal_class.identifier: getTxTimeoutOnPartitionMapExchange
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getTxTimeoutOnPartitionMapExchange()
focal_class.class_method_signature: TransactionsMXBeanImpl.setTxTimeoutOnPartitionMapExchange(long timeout)
focal_class.full_signature: @Override public void setTxTimeoutOnPartitionMapExchange(long timeout)
focal_class.identifier: setTxTimeoutOnPartitionMapExchange
focal_class.modifiers: @Override public
focal_class.parameters: (long timeout)
focal_class.return: void
focal_class.signature: void setTxTimeoutOnPartitionMapExchange(long timeout)
focal_class.class_method_signature: TransactionsMXBeanImpl.getTxOwnerDumpRequestsAllowed()
focal_class.full_signature: @Override public boolean getTxOwnerDumpRequestsAllowed()
focal_class.identifier: getTxOwnerDumpRequestsAllowed
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getTxOwnerDumpRequestsAllowed()
focal_class.class_method_signature: TransactionsMXBeanImpl.setTxOwnerDumpRequestsAllowed(boolean allowed)
focal_class.full_signature: @Override public void setTxOwnerDumpRequestsAllowed(boolean allowed)
focal_class.identifier: setTxOwnerDumpRequestsAllowed
focal_class.modifiers: @Override public
focal_class.parameters: (boolean allowed)
focal_class.return: void
focal_class.signature: void setTxOwnerDumpRequestsAllowed(boolean allowed)
focal_class.class_method_signature: TransactionsMXBeanImpl.getLongTransactionTimeDumpThreshold()
focal_class.full_signature: @Override public long getLongTransactionTimeDumpThreshold()
focal_class.identifier: getLongTransactionTimeDumpThreshold
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getLongTransactionTimeDumpThreshold()
focal_class.class_method_signature: TransactionsMXBeanImpl.setLongTransactionTimeDumpThreshold(long threshold)
focal_class.full_signature: @Override public void setLongTransactionTimeDumpThreshold(long threshold)
focal_class.identifier: setLongTransactionTimeDumpThreshold
focal_class.modifiers: @Override public
focal_class.parameters: (long threshold)
focal_class.return: void
focal_class.signature: void setLongTransactionTimeDumpThreshold(long threshold)
focal_class.class_method_signature: TransactionsMXBeanImpl.getTransactionTimeDumpSamplesCoefficient()
focal_class.full_signature: @Override public double getTransactionTimeDumpSamplesCoefficient()
focal_class.identifier: getTransactionTimeDumpSamplesCoefficient
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getTransactionTimeDumpSamplesCoefficient()
focal_class.class_method_signature: TransactionsMXBeanImpl.setTransactionTimeDumpSamplesCoefficient(double coefficient)
focal_class.full_signature: @Override public void setTransactionTimeDumpSamplesCoefficient(double coefficient)
focal_class.identifier: setTransactionTimeDumpSamplesCoefficient
focal_class.modifiers: @Override public
focal_class.parameters: (double coefficient)
focal_class.return: void
focal_class.signature: void setTransactionTimeDumpSamplesCoefficient(double coefficient)
focal_class.class_method_signature: TransactionsMXBeanImpl.getTransactionTimeDumpSamplesPerSecondLimit()
focal_class.full_signature: @Override public int getTransactionTimeDumpSamplesPerSecondLimit()
focal_class.identifier: getTransactionTimeDumpSamplesPerSecondLimit
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTransactionTimeDumpSamplesPerSecondLimit()
focal_class.class_method_signature: TransactionsMXBeanImpl.setTransactionTimeDumpSamplesPerSecondLimit(int limit)
focal_class.full_signature: @Override public void setTransactionTimeDumpSamplesPerSecondLimit(int limit)
focal_class.identifier: setTransactionTimeDumpSamplesPerSecondLimit
focal_class.modifiers: @Override public
focal_class.parameters: (int limit)
focal_class.return: void
focal_class.signature: void setTransactionTimeDumpSamplesPerSecondLimit(int limit)
focal_class.class_method_signature: TransactionsMXBeanImpl.setLongOperationsDumpTimeout(long timeout)
focal_class.full_signature: @Override public void setLongOperationsDumpTimeout(long timeout)
focal_class.identifier: setLongOperationsDumpTimeout
focal_class.modifiers: @Override public
focal_class.parameters: (long timeout)
focal_class.return: void
focal_class.signature: void setLongOperationsDumpTimeout(long timeout)
focal_class.class_method_signature: TransactionsMXBeanImpl.getLongOperationsDumpTimeout()
focal_class.full_signature: @Override public long getLongOperationsDumpTimeout()
focal_class.identifier: getLongOperationsDumpTimeout
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getLongOperationsDumpTimeout()
focal_class.class_method_signature: TransactionsMXBeanImpl.setTxKeyCollisionsInterval(int timeout)
focal_class.full_signature: @Override public void setTxKeyCollisionsInterval(int timeout)
focal_class.identifier: setTxKeyCollisionsInterval
focal_class.modifiers: @Override public
focal_class.parameters: (int timeout)
focal_class.return: void
focal_class.signature: void setTxKeyCollisionsInterval(int timeout)
focal_class.class_method_signature: TransactionsMXBeanImpl.getTxKeyCollisionsInterval()
focal_class.full_signature: @Override public int getTxKeyCollisionsInterval()
focal_class.identifier: getTxKeyCollisionsInterval
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTxKeyCollisionsInterval()
focal_class.class_method_signature: TransactionsMXBeanImpl.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: @Override public String getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill) {
          try {
              IgniteCompute compute = ctx.cluster().get().compute();
  
              VisorTxProjection proj = null;
  
              if (prj != null) {
                  if ("clients".equals(prj))
                      proj = VisorTxProjection.CLIENT;
                  else if ("servers".equals(prj))
                      proj = VisorTxProjection.SERVER;
              }
  
              List<String> consIds = null;
  
              if (consistentIds != null)
                  consIds = Arrays.stream(consistentIds.split(",")).collect(Collectors.toList());
  
              VisorTxSortOrder sortOrder = null;
  
              if (order != null)
                  sortOrder = VisorTxSortOrder.valueOf(order.toUpperCase());
  
              VisorTxTaskArg arg = new VisorTxTaskArg(kill ? VisorTxOperation.KILL : VisorTxOperation.LIST,
                  limit, minDuration == null ? null : minDuration * 1000, minSize, null, proj, consIds, xid, lbRegex, sortOrder, null);
  
              Map<ClusterNode, VisorTxTaskResult> res = compute.execute(new VisorTxTask(),
                  new VisorTaskArgument<>(ctx.cluster().get().localNode().id(), arg, false));
  
              if (detailed) {
                  StringWriter sw = new StringWriter();
  
                  PrintWriter w = new PrintWriter(sw);
  
                  for (Map.Entry<ClusterNode, VisorTxTaskResult> entry : res.entrySet()) {
                      if (entry.getValue().getInfos().isEmpty())
                          continue;
  
                      ClusterNode key = entry.getKey();
  
                      w.println(key.toString());
  
                      for (VisorTxInfo info : entry.getValue().getInfos())
                          w.println(info.toUserString());
                  }
  
                  w.flush();
  
                  return sw.toString();
              }
              else {
                  int cnt = 0;
  
                  for (VisorTxTaskResult result : res.values())
                      cnt += result.getInfos().size();
  
                  return Integer.toString(cnt);
              }
          }
          catch (Exception e) {
              throw new RuntimeException(e.getMessage());
          }
      }
focal_method.class_method_signature: TransactionsMXBeanImpl.getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_method.full_signature: @Override public String getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_method.identifier: getActiveTransactions
focal_method.invocations: compute get cluster equals equals collect stream split toList valueOf toUpperCase execute id localNode get cluster entrySet isEmpty getInfos getValue getKey println toString getInfos getValue println toUserString flush toString values size getInfos toString getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)
focal_method.return: String
focal_method.signature: String getActiveTransactions(Long minDuration, Integer minSize, String prj, String consistentIds,
          String xid, String lbRegex, Integer limit, String order, boolean detailed, boolean kill)