Пример #1
0
 @Override
 public boolean shouldForceSync() {
   for (JournalAndStream js : journals) {
     if (js.isActive() && js.getCurrentStream().shouldForceSync()) {
       return true;
     }
   }
   return false;
 }
Пример #2
0
 @Override
 protected long getNumSync() {
   for (JournalAndStream jas : journals) {
     if (jas.isActive()) {
       return jas.getCurrentStream().getNumSync();
     }
   }
   return 0;
 }
Пример #3
0
 /** Add sync times to the buffer. */
 String getSyncTimes() {
   StringBuilder buf = new StringBuilder();
   for (JournalAndStream jas : journals) {
     if (jas.isActive()) {
       buf.append(jas.getCurrentStream().getTotalSyncTime());
       buf.append(" ");
     }
   }
   return buf.toString();
 }
Пример #4
0
 @Override
 public long getNumberOfTransactions(long fromTxnId) throws IOException {
   long num = 0;
   for (JournalAndStream jas : journals) {
     if (jas.isActive()) {
       long newNum = jas.getManager().getNumberOfTransactions(fromTxnId);
       if (newNum > num) {
         num = newNum;
       }
     }
   }
   return num;
 }