Examples of cancel()


Examples of io.netty.channel.ChannelFuture.cancel()

    public void cancelPendingFutures(boolean mayInterruptIfRunning) {
        for (Iterator<ChannelFuture> iterator = pendingFutures.iterator(); iterator.hasNext(); ) {
            ChannelFuture pendingFuture = iterator.next();
            iterator.remove();
            pendingFuture.cancel(mayInterruptIfRunning);
        }
    }

    @Override
    public void operationComplete(ChannelFuture future) throws Exception {
View Full Code Here

Examples of io.netty.util.Timeout.cancel()

    }

    public void cancel(SchedulerKey key) {
        Timeout timeout = scheduledFutures.remove(key);
        if (timeout != null) {
            timeout.cancel();
        }
    }

    public void schedule(final Runnable runnable, long delay, TimeUnit unit) {
        executorService.newTimeout(new TimerTask() {
View Full Code Here

Examples of io.undertow.websockets.core.WebSocketChannel.cancel()

            }
        }, null);
        ioFuture.addCancelHandler(new Cancellable() {
            @Override
            public Cancellable cancel() {
                result.cancel();
                return null;
            }
        });
        return ioFuture.getIoFuture();
    }
View Full Code Here

Examples of io.vertx.core.TimeoutStream.cancel()

      fail();
    });
    timer.endHandler(v -> {
      testComplete();
    });
    timer.cancel();
    await();
  }

  @Test
  public void testTimerSetHandlerTwice() throws Exception {
View Full Code Here

Examples of java.nio.channels.SelectionKey.cancel()

            } else if(byteRead == 0 && byteBuffer.position() != preReadInputBBPos) {
                byteRead += (byteBuffer.position() - preReadInputBBPos);
            }
        } finally {
            if(tmpKey != null) {
                tmpKey.cancel();
            }
            if(readSelector != null) {// Bug 6403933
                try {
                    readSelector.selectNow();
                } catch (IOException e) {
View Full Code Here

Examples of java.nio.file.WatchKey.cancel()

         }

         if (!keys.containsKey(key))
         {
            // key is no longer available in the keys Map. Cancel it
            key.cancel();
         }
         else
         {
            // reset key and remove from set if directory no longer accessible
            boolean valid = key.reset();
View Full Code Here

Examples of java.sql.CallableStatement.cancel()

        System.out.println("Callable Statement Test failed");
      }
      catch(SQLException e) { }

      try {
        cs.cancel();
        System.out.println("Callable Statement Test failed");
      }
      catch(SQLException e) { }

      if (isDerbyNet)
View Full Code Here

Examples of java.sql.PreparedStatement.cancel()

                prep.execute();
            }
        };
        t.execute();
        Thread.sleep(100);
        prep.cancel();
        SQLException e = (SQLException) t.getException();
        assertTrue(e != null);
        assertEquals(ErrorCode.STATEMENT_WAS_CANCELED, e.getErrorCode());
        prep.setInt(1, 1);
        prep.setInt(2, 1);
View Full Code Here

Examples of java.sql.Statement.cancel()

                stat.execute("script simple drop to '"+dir+"/backup2.sql'");
            }
        };
        task.execute();
        Thread.sleep(200);
        stat.cancel();
        SQLException e = (SQLException) task.getException();
        assertTrue(e != null);
        assertEquals(ErrorCode.STATEMENT_WAS_CANCELED, e.getErrorCode());

        stat.execute("set throttle 1000");
View Full Code Here

Examples of java.util.Timer.cancel()

     
      int individualID = userObject.getIndividualID();    // logged in user
      Timer userTimer = siteInfo.getUserTimer(individualID);
      if (userTimer != null)
      {
        userTimer.cancel();
      }
      if (session != null)
      {
        session.invalidate();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.