- public boolean removeTxId(NodeId nodeId, TransactionId id){
- TxIdEntry entry = new TxIdEntry(nodeId,id,null);
- return txIdToRequestTypeMap.remove(entry)==null?false:true;
- }
-
- private Date getExpiryTime(){
- Date expires = new Date();
- expires.setTime(expires.getTime()+StatisticsProvider.STATS_THREAD_EXECUTION_TIME*NUMBER_OF_WAIT_CYCLES);
- return expires;
+
+ private static Long getExpiryTime(){
+ return System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(
+ StatisticsProvider.STATS_THREAD_EXECUTION_TIME*NUMBER_OF_WAIT_CYCLES);