100101102103104105106107108109110
pstmt.setLong(2, volId); pstmt.setInt(3, storageType); pstmt.executeUpdate(); txn.commit(); } catch (Exception e) { txn.rollback(); s_logger.warn("Error removing usageStorageVO", e); } finally { txn.close(); } }
123124125126127128129130131132133
pstmt.setInt(4, usage.getStorageType()); } pstmt.executeUpdate(); txn.commit(); } catch (Exception e) { txn.rollback(); s_logger.warn("Error updating UsageStorageVO", e); } finally { txn.close(); } }
196197198199200201202203204205206
} usageRecords.add(new UsageStorageVO(id, zoneId, acctId, dId, type, sourceId, size, virtualSize, createdDate, deletedDate)); } } catch (Exception e) { txn.rollback(); s_logger.warn("Error getting usage records", e); } finally { txn.close(); }
96979899100101102103104105106
pstmt = txn.prepareAutoCloseStatement(sql); pstmt.setLong(1, maxEventTime); pstmt.executeUpdate(); txn.commit(); } catch (Exception ex) { txn.rollback(); s_logger.error("error deleting old usage network stats", ex); } } @Override
125126127128129130131132133134135
pstmt.addBatch(); } pstmt.executeBatch(); txn.commit(); } catch (Exception ex) { txn.rollback(); s_logger.error("error saving usage_network to cloud_usage db", ex); throw new CloudRuntimeException(ex.getMessage()); } } }
8990919293949596979899
pstmt.setLong(1, accountId.longValue()); } pstmt.executeUpdate(); txn.commit(); } catch (Exception ex) { txn.rollback(); s_logger.error("error retrieving usage vm instances for account id: " + accountId); } finally { txn.close(); } }
129130131132133134135136137138139
pstmt.addBatch(); } pstmt.executeBatch(); txn.commit(); } catch (Exception ex) { txn.rollback(); s_logger.error("error saving account to cloud_usage db", ex); throw new CloudRuntimeException(ex.getMessage()); } }
159160161162163164165166167168169
200201202203204205206207208209210
pstmt.addBatch(); } pstmt.executeBatch(); txn.commit(); } catch (Exception ex) { txn.rollback(); s_logger.error("error saving user stats to cloud_usage db", ex); throw new CloudRuntimeException(ex.getMessage()); } }
227228229230231232233234235236237