Exemplo n.º 1
0
 @Override
 public void callPaymentByName(
     short w_id,
     byte d_id,
     double h_amount,
     short c_w_id,
     byte c_d_id,
     byte[] c_last,
     TimestampType now)
     throws IOException {
   try {
     if ((scaleParams.warehouses > 1) || (c_last != null)) {
       m_clientCon.executeAsync(
           new VerifyBasicCallback(),
           Constants.PAYMENT_BY_NAME_W,
           w_id,
           d_id,
           h_amount,
           c_w_id,
           c_d_id,
           c_last,
           now);
       m_clientCon.executeAsync(
           new VerifyBasicCallback(
               TPCCSimulation.Transaction.PAYMENT, Constants.PAYMENT_BY_NAME_C),
           Constants.PAYMENT_BY_NAME_C,
           w_id,
           d_id,
           h_amount,
           c_w_id,
           c_d_id,
           c_last,
           now);
     } else {
       m_clientCon.executeAsync(
           new VerifyBasicCallback(TPCCSimulation.Transaction.PAYMENT, Constants.PAYMENT_BY_ID),
           Constants.PAYMENT_BY_ID,
           w_id,
           d_id,
           h_amount,
           c_w_id,
           c_d_id,
           c_last,
           now);
     }
   } catch (Exception e) {
     throw new IOException(e);
   }
 }
Exemplo n.º 2
0
 @Override
 public void callNewOrder(boolean rollback, Object... paramlist) throws IOException {
   try {
     m_clientCon.executeAsync(new NewOrderCallback(rollback), Constants.NEWORDER, paramlist);
   } catch (Exception e) {
     throw new IOException(e);
   }
 }
Exemplo n.º 3
0
 @Override
 public void callDelivery(short w_id, int carrier, TimestampType date) throws IOException {
   try {
     m_clientCon.executeAsync(new DeliveryCallback(), Constants.DELIVERY, w_id, carrier, date);
   } catch (Exception e) {
     throw new IOException(e);
   }
 }
Exemplo n.º 4
0
 @Override
 public void callStockLevel(short w_id, byte d_id, int threshold) throws IOException {
   final StockLevelCallback cb = new StockLevelCallback();
   try {
     m_clientCon.executeAsync(cb, Constants.STOCK_LEVEL, w_id, d_id, threshold);
   } catch (Exception e) {
     throw new IOException(e);
   }
 }
Exemplo n.º 5
0
 @Override
 public void callOrderStatus(String proc, Object... paramlist) throws IOException {
   try {
     m_clientCon.executeAsync(
         new VerifyBasicCallback(TPCCSimulation.Transaction.ORDER_STATUS, proc), proc, paramlist);
   } catch (Exception e) {
     throw new IOException(e);
   }
 }
Exemplo n.º 6
0
 @Override
 public void callResetWarehouse(
     long w_id, long districtsPerWarehouse, long customersPerDistrict, long newOrdersPerDistrict)
     throws IOException {
   try {
     m_clientCon.executeAsync(
         new ResetWarehouseCallback(),
         Constants.RESET_WAREHOUSE,
         w_id,
         districtsPerWarehouse,
         customersPerDistrict,
         newOrdersPerDistrict);
   } catch (Exception e) {
     throw new IOException(e);
   }
 }