/** * {@inheritDoc} * * @see com.continuent.tungsten.replicator.storage.Store#status() */ public TungstenProperties status() { // Get super class properties. TungstenProperties props = super.status(); // Add properties for prefetch. props.setString("url", url); props.setString("slaveCatalogSchema", slaveCatalogSchema); props.setLong("interval", interval); props.setLong("aheadMaxTime", aheadMaxTime); props.setLong("sleepTime", sleepTime); props.setLong("warmUpEventCount", warmUpEventCount); // Add runtime properties. props.setLong("prefetchEvents", prefetchEvents); double prefetchRatio = 0.0; if (totalEvents > 0) prefetchRatio = ((double) prefetchEvents) / totalEvents; props.setString("prefetchRatio", formatDouble(prefetchRatio)); props.setString("prefetchState", prefetchState.toString()); props.setString("slaveLatency", formatDouble(slaveLatency)); props.setString("prefetchLatency", formatDouble(prefetchLatency / 1000.0)); props.setString("prefetchTimeAhead", formatDouble(slaveLatency - (prefetchLatency / 1000.0))); props.setString("prefetchState", prefetchState.toString()); long duration = System.currentTimeMillis() - startTimeMillis; double timeActive = (duration - sleepTimeMillis) / 1000.0; double timeSleeping = sleepTimeMillis / 1000.0; props.setString("timeActive", formatDouble(timeActive)); props.setString("timeSleeping", formatDouble(timeSleeping)); return props; }
/** * {@inheritDoc} * * @see com.continuent.tungsten.replicator.storage.Store#status() */ @Override public TungstenProperties status() { TungstenProperties props = new TungstenProperties(); props.setLong(Replicator.MIN_STORED_SEQNO, getMinStoredSeqno()); props.setLong(Replicator.MAX_STORED_SEQNO, getMaxStoredSeqno()); props.setLong("activeSeqno", diskLog.getActiveSeqno()); props.setBoolean("doChecksum", doChecksum); props.setString("logDir", logDir); props.setInt("logFileSize", logFileSize); props.setLong("logFileRetainMillis", logFileRetainMillis); props.setLong("logFileSize", diskLog.getLogFileSize()); props.setLong("timeoutMillis", diskLog.getTimeoutMillis()); props.setBoolean("fsyncOnFlush", fsyncOnFlush); props.setLong("flushIntervalMillis", diskLog.getFlushIntervalMillis()); props.setLong("timeoutMillis", diskLog.getTimeoutMillis()); props.setLong("logConnectionTimeout", logConnectionTimeout); props.setBoolean("readOnly", readOnly); return props; }