test_class.declarator: index = new AtomicInteger()
test_class.modifier: private static final
test_class.original_string: private static final AtomicInteger index = new AtomicInteger();
test_class.type: AtomicInteger
test_class.var_name: index
test_class.file: dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/exchange/support/DefaultFutureTest.java
test_class.identifier: DefaultFutureTest
test_case.body: @Test
      @Disabled
      public void timeoutNotSend() throws Exception {
          final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
          System.out.println("before a future is create , time is : " + LocalDateTime.now().format(formatter));
          // timeout after 5 seconds.
          DefaultFuture f = defaultFuture(5000);
          while (!f.isDone()) {
              //spin
              Thread.sleep(100);
          }
          System.out.println("after a future is timeout , time is : " + LocalDateTime.now().format(formatter));
  
          // get operate will throw a timeout exception, because the future is timeout.
          try {
              f.get();
          } catch (Exception e) {
              Assertions.assertTrue(e.getCause() instanceof TimeoutException, "catch exception is not timeout exception!");
              System.out.println(e.getMessage());
          }
      }
test_case.class_method_signature: DefaultFutureTest.timeoutNotSend()
test_case.full_signature: @Test @Disabled public void timeoutNotSend()
test_case.identifier: timeoutNotSend
test_case.invocations: ofPattern println format now defaultFuture isDone sleep println format now get assertTrue getCause println getMessage
test_case.modifiers: @Test @Disabled public
test_case.parameters: ()
test_case.return: void
test_case.signature: void timeoutNotSend()
focal_class.declarator: logger = LoggerFactory.getLogger(DefaultFuture.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(DefaultFuture.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: CHANNELS = new ConcurrentHashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<Long, Channel> CHANNELS = new ConcurrentHashMap<>();
focal_class.type: Map<Long, Channel>
focal_class.var_name: CHANNELS
focal_class.declarator: FUTURES = new ConcurrentHashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<Long, DefaultFuture> FUTURES = new ConcurrentHashMap<>();
focal_class.type: Map<Long, DefaultFuture>
focal_class.var_name: FUTURES
focal_class.declarator: TIME_OUT_TIMER = new HashedWheelTimer(
              new NamedThreadFactory("dubbo-future-timeout", true),
              30,
              TimeUnit.MILLISECONDS)
focal_class.modifier: public static final
focal_class.original_string: public static final Timer TIME_OUT_TIMER = new HashedWheelTimer(
              new NamedThreadFactory("dubbo-future-timeout", true),
              30,
              TimeUnit.MILLISECONDS);
focal_class.type: Timer
focal_class.var_name: TIME_OUT_TIMER
focal_class.declarator: id
focal_class.modifier: private final
focal_class.original_string: private final Long id;
focal_class.type: Long
focal_class.var_name: id
focal_class.declarator: channel
focal_class.modifier: private final
focal_class.original_string: private final Channel channel;
focal_class.type: Channel
focal_class.var_name: channel
focal_class.declarator: request
focal_class.modifier: private final
focal_class.original_string: private final Request request;
focal_class.type: Request
focal_class.var_name: request
focal_class.declarator: timeout
focal_class.modifier: private final
focal_class.original_string: private final int timeout;
focal_class.type: int
focal_class.var_name: timeout
focal_class.declarator: start = System.currentTimeMillis()
focal_class.modifier: private final
focal_class.original_string: private final long start = System.currentTimeMillis();
focal_class.type: long
focal_class.var_name: start
focal_class.declarator: sent
focal_class.modifier: private volatile
focal_class.original_string: private volatile long sent;
focal_class.type: long
focal_class.var_name: sent
focal_class.declarator: timeoutCheckTask
focal_class.modifier: private
focal_class.original_string: private Timeout timeoutCheckTask;
focal_class.type: Timeout
focal_class.var_name: timeoutCheckTask
focal_class.declarator: executor
focal_class.modifier: private
focal_class.original_string: private ExecutorService executor;
focal_class.type: ExecutorService
focal_class.var_name: executor
focal_class.file: dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java
focal_class.identifier: DefaultFuture
focal_class.class_method_signature: DefaultFuture.getExecutor()
focal_class.full_signature: public ExecutorService getExecutor()
focal_class.identifier: getExecutor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ExecutorService
focal_class.signature: ExecutorService getExecutor()
focal_class.class_method_signature: DefaultFuture.setExecutor(ExecutorService executor)
focal_class.full_signature: public void setExecutor(ExecutorService executor)
focal_class.identifier: setExecutor
focal_class.modifiers: public
focal_class.parameters: (ExecutorService executor)
focal_class.return: void
focal_class.signature: void setExecutor(ExecutorService executor)
focal_class.class_method_signature: DefaultFuture.DefaultFuture(Channel channel, Request request, int timeout)
focal_class.full_signature: private  DefaultFuture(Channel channel, Request request, int timeout)
focal_class.identifier: DefaultFuture
focal_class.modifiers: private
focal_class.parameters: (Channel channel, Request request, int timeout)
focal_class.signature:  DefaultFuture(Channel channel, Request request, int timeout)
focal_class.class_method_signature: DefaultFuture.timeoutCheck(DefaultFuture future)
focal_class.full_signature: private static void timeoutCheck(DefaultFuture future)
focal_class.identifier: timeoutCheck
focal_class.modifiers: private static
focal_class.parameters: (DefaultFuture future)
focal_class.return: void
focal_class.signature: void timeoutCheck(DefaultFuture future)
focal_class.class_method_signature: DefaultFuture.newFuture(Channel channel, Request request, int timeout, ExecutorService executor)
focal_class.full_signature: public static DefaultFuture newFuture(Channel channel, Request request, int timeout, ExecutorService executor)
focal_class.identifier: newFuture
focal_class.modifiers: public static
focal_class.parameters: (Channel channel, Request request, int timeout, ExecutorService executor)
focal_class.return: DefaultFuture
focal_class.signature: DefaultFuture newFuture(Channel channel, Request request, int timeout, ExecutorService executor)
focal_class.class_method_signature: DefaultFuture.getFuture(long id)
focal_class.full_signature: public static DefaultFuture getFuture(long id)
focal_class.identifier: getFuture
focal_class.modifiers: public static
focal_class.parameters: (long id)
focal_class.return: DefaultFuture
focal_class.signature: DefaultFuture getFuture(long id)
focal_class.class_method_signature: DefaultFuture.hasFuture(Channel channel)
focal_class.full_signature: public static boolean hasFuture(Channel channel)
focal_class.identifier: hasFuture
focal_class.modifiers: public static
focal_class.parameters: (Channel channel)
focal_class.return: boolean
focal_class.signature: boolean hasFuture(Channel channel)
focal_class.class_method_signature: DefaultFuture.sent(Channel channel, Request request)
focal_class.full_signature: public static void sent(Channel channel, Request request)
focal_class.identifier: sent
focal_class.modifiers: public static
focal_class.parameters: (Channel channel, Request request)
focal_class.return: void
focal_class.signature: void sent(Channel channel, Request request)
focal_class.class_method_signature: DefaultFuture.closeChannel(Channel channel)
focal_class.full_signature: public static void closeChannel(Channel channel)
focal_class.identifier: closeChannel
focal_class.modifiers: public static
focal_class.parameters: (Channel channel)
focal_class.return: void
focal_class.signature: void closeChannel(Channel channel)
focal_class.class_method_signature: DefaultFuture.received(Channel channel, Response response)
focal_class.full_signature: public static void received(Channel channel, Response response)
focal_class.identifier: received
focal_class.modifiers: public static
focal_class.parameters: (Channel channel, Response response)
focal_class.return: void
focal_class.signature: void received(Channel channel, Response response)
focal_class.class_method_signature: DefaultFuture.received(Channel channel, Response response, boolean timeout)
focal_class.full_signature: public static void received(Channel channel, Response response, boolean timeout)
focal_class.identifier: received
focal_class.modifiers: public static
focal_class.parameters: (Channel channel, Response response, boolean timeout)
focal_class.return: void
focal_class.signature: void received(Channel channel, Response response, boolean timeout)
focal_class.class_method_signature: DefaultFuture.cancel(boolean mayInterruptIfRunning)
focal_class.full_signature: @Override public boolean cancel(boolean mayInterruptIfRunning)
focal_class.identifier: cancel
focal_class.modifiers: @Override public
focal_class.parameters: (boolean mayInterruptIfRunning)
focal_class.return: boolean
focal_class.signature: boolean cancel(boolean mayInterruptIfRunning)
focal_class.class_method_signature: DefaultFuture.cancel()
focal_class.full_signature: public void cancel()
focal_class.identifier: cancel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cancel()
focal_class.class_method_signature: DefaultFuture.doReceived(Response res)
focal_class.full_signature: private void doReceived(Response res)
focal_class.identifier: doReceived
focal_class.modifiers: private
focal_class.parameters: (Response res)
focal_class.return: void
focal_class.signature: void doReceived(Response res)
focal_class.class_method_signature: DefaultFuture.getId()
focal_class.full_signature: private long getId()
focal_class.identifier: getId
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getId()
focal_class.class_method_signature: DefaultFuture.getChannel()
focal_class.full_signature: private Channel getChannel()
focal_class.identifier: getChannel
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Channel
focal_class.signature: Channel getChannel()
focal_class.class_method_signature: DefaultFuture.isSent()
focal_class.full_signature: private boolean isSent()
focal_class.identifier: isSent
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isSent()
focal_class.class_method_signature: DefaultFuture.getRequest()
focal_class.full_signature: public Request getRequest()
focal_class.identifier: getRequest
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Request
focal_class.signature: Request getRequest()
focal_class.class_method_signature: DefaultFuture.getTimeout()
focal_class.full_signature: private int getTimeout()
focal_class.identifier: getTimeout
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTimeout()
focal_class.class_method_signature: DefaultFuture.doSent()
focal_class.full_signature: private void doSent()
focal_class.identifier: doSent
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doSent()
focal_class.class_method_signature: DefaultFuture.getTimeoutMessage(boolean scan)
focal_class.full_signature: private String getTimeoutMessage(boolean scan)
focal_class.identifier: getTimeoutMessage
focal_class.modifiers: private
focal_class.parameters: (boolean scan)
focal_class.return: String
focal_class.signature: String getTimeoutMessage(boolean scan)
focal_class.class_method_signature: DefaultFuture.getRequestWithoutData()
focal_class.full_signature: private Request getRequestWithoutData()
focal_class.identifier: getRequestWithoutData
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Request
focal_class.signature: Request getRequestWithoutData()
focal_class.superclass: extends CompletableFuture<Object>
focal_method.body: private DefaultFuture(Channel channel, Request request, int timeout) {
          this.channel = channel;
          this.request = request;
          this.id = request.getId();
          this.timeout = timeout > 0 ? timeout : channel.getUrl().getPositiveParameter(TIMEOUT_KEY, DEFAULT_TIMEOUT);
          // put into waiting map.
          FUTURES.put(id, this);
          CHANNELS.put(id, channel);
      }
focal_method.class_method_signature: DefaultFuture.DefaultFuture(Channel channel, Request request, int timeout)
focal_method.full_signature: private  DefaultFuture(Channel channel, Request request, int timeout)
focal_method.identifier: DefaultFuture
focal_method.modifiers: private
focal_method.parameters: (Channel channel, Request request, int timeout)
focal_method.signature:  DefaultFuture(Channel channel, Request request, int timeout)