Java 8 InterruptedIOException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 InterruptedIOException class.

This code example shows how to use the following methods:
 
        @Test
        public void run6() throws InterruptedIOException {
            logger.append("run6");
            // Java IO throws InterruptedIOException only on SUN machines. 
            throw new InterruptedIOException();
        } 
    } 
 
    public static class HasGlobalLongTimeout extends AbstractTimeoutTest { 
 
        @Rule 
        public final TestRule globalTimeout = Timeout.millis(200);
    } 
 
    public static class HasGlobalTimeUnitTimeout extends AbstractTimeoutTest { 
 
        @Rule 
        public final TestRule globalTimeout = new Timeout(200, TimeUnit.MILLISECONDS);
    } 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:initCause
 
    if (t instanceof InterruptedIOException) return (InterruptedIOException) t;
 
    if (t instanceof InterruptedException || t instanceof ClosedByInterruptException) {
      InterruptedIOException iie =
          new InterruptedIOException("Origin: " + t.getClass().getSimpleName());
      iie.initCause(t);
      return iie;
    } 
 
    return null; 
  } 
 
  private ExceptionUtil() { 
  } 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
  } 
 
  @Override 
  public void prepare(boolean reload) throws IOException {
    if (Thread.interrupted()) {
      throw new InterruptedIOException();
    } 
 
    if (reload || location == null) {
      location = getLocation(!reload);
    } 
 
    if (location == null) {
      // With this exception, there will be a retry. 
      throw new HBaseIOException(getExceptionMessage()); 
    } 
 
    this.setStub(connection.getAdmin(location.getServerName()));
  } 
 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
  throws KeeperException, IOException {
    byte [] data;
    try { 
      data = ZKUtil.getData(zkw, zkw.getMasterAddressZNode());
    } catch (InterruptedException e) {
      throw new InterruptedIOException();
    } 
    if (data == null){
      throw new IOException("Can't get master address from ZooKeeper; znode data == null");
    } 
    try { 
      return ServerName.parseFrom(data);
    } catch (DeserializationException e) {
      KeeperException ke = new KeeperException.DataInconsistencyException();
      ke.initCause(e);
      throw ke;
    } 
  } 
 
  /** 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
        try { 
          lock.release();
        } catch (InterruptedException e) {
          LOG.warn("Interrupted while releasing a lock for " + tableName);
          throw new InterruptedIOException();
        } 
        if (LOG.isTraceEnabled()) {
          LOG.trace("Released table lock on " + tableName);
        } 
      } 
 
      private InterProcessLock createTableLock() { 
        String tableLockZNode = ZKUtil.joinZNode(zkWatcher.tableLockZNode,
            tableName.getNameAsString());
 
        ZooKeeperProtos.TableLock data = ZooKeeperProtos.TableLock.newBuilder()
          .setTableName(ProtobufUtil.toProtoTableName(tableName))
          .setLockOwner(ProtobufUtil.toServerName(serverName))
          .setThreadId(Thread.currentThread().getId())
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    { 
        try { 
            q.put( a );
        } 
        catch( InterruptedException exn ) {
            throw new InterruptedIOException( exn.getMessage() );
        } 
    } 
 
    public void write( int i ) throws IOException
    { 
        byte b[] = new byte[1];
        b[0] = (byte) (i & 0xff);
        guarded_put( b );
    } 
 
    public void write(byte[] b, int off, int len) throws IOException
    { 
        byte[] a = new byte [len];
        System.arraycopy(b, off, a, 0, len);
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
  } 
 
  void checkIfCancelled(final CancelableProgressable reporter)
  throws InterruptedIOException {
    if (reporter == null) return;
    if (!reporter.progress()) throw new InterruptedIOException("Operation cancelled");
  } 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
        try { 
            eth.join( );
            if(DEBUG) dbg.printf("%s joined %s%n", this, eth);
        } 
        catch( InterruptedException exn ) {
            throw new InterruptedIOException( exn.getMessage() );
        } 
        if( eth.exn != null ) {
            throw eth.exn;
        } 
    } 
 
    public String toString( )
    { 
        return String.format("lzmaOut@%x", hashCode());
    } 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    { 
        try { 
            return q.take( );
        } 
        catch( InterruptedException exn ) {
            throw new InterruptedIOException( exn.getMessage() );
        } 
    } 
 
    protected boolean prepareAndCheckEOF( ) throws IOException 
    { 
        if( eof ) return true;
        if( buf == null || next >= buf.length )
            { 
                buf = guarded_take( );
                next = 0;
                if( buf.length == 0 )
                    { 
                        eof = true;
                        return true; 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	public void foo(int a) throws Exception {
		/*[*/try { 
			if (a < 10)
				throw new FileNotFoundException();
			else if (a < 20)
				throw new InterruptedIOException();
			else 
				throw new IOException();
		} catch (FileNotFoundException | InterruptedIOException ex) {
			ex.printStackTrace();
		}/*]*/ 
	} 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Java 8 InterruptedIOException Questions & Answers:

See Code Examples for Java 8 InterruptedIOException Methods: