}
@Override
protected void refresh(boolean reset) {
try {
Management management = _adminUI.getManagement();
if (management == null) {
_version.setText("");
_copyright.setText("");
_started.setText("");
_elapsed.setText("");
_totalReads.setText("");
_totalWrites.setText("");
_totalGets.setText("");
_hitRatio.setText("");
_commits.setText("");
_rollbacks.setText("");
_rollbacksSinceLastCommit.setText("");
_journalCurLocation.setText("");
_journalBlockSize.setText("");
_journalBaseAddress.setText("");
_journalPageMapSize.setText("");
_journalPageCount.setText("");
_journalCopiedPageCount.setText("");
_journalReadPageCount.setText("");
_journalValidCkptTime.setText("");
_journalValidCkptAgo.setText("");
_journalValidCkptTimestamp.setText("");
_journalValidCkptLocation.setText("");
_journalAppendOnly.setText("");
_journalCopyFast.setText("");
_recoveryApplied.setText("");
_recoveryBaseAddress.setText("");
_recoveryCkptLocation.setText("");
_recoveryCkptTime.setText("");
_recoveryCkptTimestamp.setText("");
_recoveryCommitted.setText("");
_recoveryEndAddress.setText("");
_recoveryException.setText("");
_recoveryKeystone.setText("");
_recoveryUncommitted.setText("");
_volumeInfoArrayModel.setInfoArray(null);
} else {
_version.setText(management.getVersion());
_copyright.setText(management.getCopyright());
_started.setText(_adminUI.formatDate(management.getStartTime()));
_elapsed.setText(_adminUI.formatTime(management.getElapsedTime()));
_frozenUpdates.setText(management.isUpdateSuspended() ? _frozenTrueCaption : _frozenFalseCaption);
_frozenUpdates.setForeground(management.isUpdateSuspended() ? Color.red : _normalForegroundColor);
_frozenShutdown.setText(management.isShutdownSuspended() ? _frozenTrueCaption : _frozenFalseCaption);
_frozenShutdown.setForeground(management.isShutdownSuspended() ? Color.red : _normalForegroundColor);
final Management.JournalInfo jinfo = management.getJournalInfo();
_journalCurLocation.setText(_adminUI.formatFileLocation(jinfo.getCurrentJournalFile(), jinfo
.getCurrentJournalAddress()));
_journalBlockSize.setText(_adminUI.formatLong(jinfo.getBlockSize()));
_journalBaseAddress.setText(_adminUI.formatLong(jinfo.getBaseAddress()));
_journalPageMapSize.setText(_adminUI.formatLong(jinfo.getPageMapSize()));
_journalPageCount.setText(_adminUI.formatLong(jinfo.getJournaledPageCount()));
_journalCopiedPageCount.setText(_adminUI.formatLong(jinfo.getCopiedPageCount()));
_journalReadPageCount.setText(_adminUI.formatLong(jinfo.getReadPageCount()));
if (jinfo.getLastValidCheckpointSystemTime() != 0) {
_journalValidCkptTime.setText(_adminUI.formatDate(jinfo.getLastValidCheckpointSystemTime()));
_journalValidCkptAgo.setText(_adminUI.formatLong(jinfo.getLastValidCheckpointAge()));
_journalValidCkptTimestamp.setText(_adminUI.formatLong(jinfo.getLastValidCheckpointTimestamp()));
_journalValidCkptLocation.setText(_adminUI.formatFileLocation(jinfo
.getLastValidCheckpointJournalFile(), jinfo.getLastValidCheckpointJournalAddress()));
}
_journalAppendOnly.setText(jinfo.isAppendOnly() ? _enabledCaption : _disabledCaption);
_journalCopyFast.setText(jinfo.isFastCopying() ? _enabledCaption : _disabledCaption);
final Management.RecoveryInfo rinfo = management.getRecoveryInfo();
_recoveryApplied.setText(_adminUI.formatInteger(rinfo.getAppliedTransactions()));
_recoveryBaseAddress.setText(_adminUI.formatLong(rinfo.getBaseAddress()));
_recoveryCkptLocation.setText(_adminUI.formatLong(rinfo.getLastValidCheckpointJournalAddress()));
_recoveryCkptTime.setText(_adminUI.formatDate(rinfo.getLastValidCheckpointSystemTime()));
_recoveryCkptTimestamp.setText(_adminUI.formatLong(rinfo.getLastValidCheckpointTimestamp()));
_recoveryCommitted.setText(_adminUI.formatInteger(rinfo.getCommittedTransactions()));
_recoveryEndAddress.setText(_adminUI.formatLong(rinfo.getRecoveryEndAddress()));
_recoveryException.setText(rinfo.getRecoveryEndedException() == null ? "none" : rinfo
.getRecoveryEndedException());
_recoveryKeystone.setText(_adminUI.formatFileLocation(rinfo.getKeystoneJournalFile(), rinfo
.getKeystoneJournalAddress()));
_recoveryUncommitted.setText(_adminUI.formatInteger(rinfo.getUncommittedTransactions()));
final Management.BufferPoolInfo[] bpia = management.getBufferPoolInfoArray();
long reads = 0;
long writes = 0;
long misses = 0;
long hits = 0;
long creates = 0;
for (int index = 0; index < bpia.length; index++) {
misses += bpia[index].getMissCount();
hits += bpia[index].getHitCount();
creates += bpia[index].getNewCount();
}
Management.VolumeInfo[] via = management.getVolumeInfoArray();
if (_selectedVolumeName == null && via.length > 0) {
_selectedVolumeName = via[0].getPath();
}
for (int index = 0; index < via.length; index++) {
reads += via[index].getReadCounter();
writes += via[index].getWriteCounter();
}
_totalReads.setText(_adminUI.formatLong(reads));
_totalWrites.setText(_adminUI.formatLong(writes));
_totalGets.setText(_adminUI.formatLong(misses));
_hitRatio.setText(misses + hits + creates > 0 ? _adminUI.formatPercent((double) hits
/ (double) (misses + hits + creates)) : "n/a");
_volumeInfoArrayModel.setInfoArray(via);
Management.TransactionInfo transactionInfo = management.getTransactionInfo();
_commits.setText(_adminUI.formatLong(transactionInfo.getCommitCount()));
_rollbacks.setText(_adminUI.formatLong(transactionInfo.getRollbackCount()));
_rollbacksSinceLastCommit.setText(_adminUI.formatLong(transactionInfo.getRollbackSinceCommitCount()));
}