예제 #1
0
 private static void close(AutoCloseable closable) {
   try {
     if (closable != null) {
       closable.close();
       closable = null;
     }
   } catch (Exception sqle) {
     sqle.printStackTrace();
   }
 }
예제 #2
0
  /** {@inheritDoc} */
  @Override
  public void close() {
    Iterator<T> i;

    if ((i = iter) != null) {
      iter = null;

      if (i instanceof AutoCloseable) {
        try {
          ((AutoCloseable) i).close();
        } catch (Exception e) {
          throw new IgniteException(e);
        }
      }
    }
  }