Exemplo n.º 1
0
 @Override
 public boolean shouldForceSync() {
   for (JournalAndStream js : journals) {
     if (js.isActive() && js.getCurrentStream().shouldForceSync()) {
       return true;
     }
   }
   return false;
 }
Exemplo n.º 2
0
 @Override
 protected long getNumSync() {
   for (JournalAndStream jas : journals) {
     if (jas.isActive()) {
       return jas.getCurrentStream().getNumSync();
     }
   }
   return 0;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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;
 }