Esempio n. 1
0
 private void closeConnection() {
   Debug.println("NetScan closing connection", 5);
   try {
     if (in != null) in.close();
     if (socket != null) socket.close();
     if (serverSocket != null) {
       serverSocket.close();
     }
   } catch (IOException ioe) {
     ioe.printStackTrace();
   }
 }
 public static Request read(DataInputStream dis) throws IOException {
   long handle = dis.readLong();
   int insertLow = dis.readInt();
   int insertHigh = dis.readInt();
   int deleteLow = dis.readInt();
   int hwm = dis.readInt();
   boolean seeDeleted = dis.readBoolean();
   return new SpawnIndexedSeqScanReq(handle, insertLow, insertHigh, deleteLow, hwm, seeDeleted);
 }
Esempio n. 3
0
 public Tuple getNext() throws NoSuchElementException, TransactionAbortedException {
   try {
     Tuple tuple = new Tuple(td);
     for (int i = 0; i < td.numFields(); i++) {
       IntField intf = IntField.createIntField(in.readInt());
       tuple.setField(i, intf);
     }
     return tuple;
   } catch (EOFException eof) {
     throw new NoSuchElementException(eof.getMessage());
   } catch (Exception e) {
     e.printStackTrace();
     BufferPool.Instance().abortTransaction(tid);
     closeConnection();
     throw new TransactionAbortedException(e);
   }
 }
Esempio n. 4
0
 public static Request read(DataInputStream dis) throws IOException {
   long handle = dis.readLong();
   return new SpawnSeqScanReq(handle);
 }