@Override public boolean insert(final IMonitoringRecord element) { this.writer.writeMonitoringRecord(element); return true; }
@Override public String toString() { final String configInfo = super.toString(); final StringBuilder builder = new StringBuilder() .append(configInfo) .append("\n\t") .append("Internal properties:") .append("\n\t\t") .append("Log location: ") .append(this.logFolder); return builder.toString(); }
@Override public void run() { LOGGER.debug("{} is running.", this.getClass().getName()); this.writer.onStarting(); try { IMonitoringRecord record = this.writerQueue.take(); while (record != END_OF_MONITORING_RECORD) { // NOPMD (compare references by == not by equals()) this.writer.writeMonitoringRecord(record); record = this.writerQueue.take(); } } catch (final InterruptedException e) { LOGGER.debug("{} was interrupted.", this.getClass().getName(), e); // do nothing; the thread terminates itself } this.writer.onTerminating(); LOGGER.debug("{} has finished.", this.getClass().getName()); }
public static <W extends AbstractMonitoringWriter & IFileWriter> File executeFileWriterTest(final int numRecordsToWrite, final W writer, final EmptyRecord record) { writer.onStarting(); FilesystemTestUtil.writeMonitoringRecords(writer, numRecordsToWrite, record); writer.onTerminating(); return writer.getLogFolder().toFile(); }
@Override public void run() { if (LOG.isDebugEnabled()) { LOG.debug(this.getClass().getName() + " is running."); } this.writer.onStarting(); try { IMonitoringRecord record = this.writerQueue.take(); while (record != END_OF_MONITORING_RECORD) { // NOPMD (compare references by == not by equals()) this.writer.writeMonitoringRecord(record); record = this.writerQueue.take(); } } catch (final InterruptedException e) { if (LOG.isDebugEnabled()) { LOG.debug(this.getClass().getName() + " was interrupted.", e); } // do nothing; the thread terminates itself } this.writer.onTerminating(); if (LOG.isDebugEnabled()) { LOG.debug(this.getClass().getName() + " has finished."); } }
@Override public String toString() { final String configInfo = super.toString(); final StringBuilder builder = new StringBuilder() .append(configInfo) .append("\n\t") .append("Internal properties:") .append("\n\t\t") .append("Log location: ") .append(this.logFolder); return builder.toString(); } }
@Override public boolean insert(final IMonitoringRecord element) { this.writer.writeMonitoringRecord(element); return true; }
@Override public final String toString() { final StringBuilder sb = new StringBuilder(128); sb.append(super.toString()); sb.append("; Session: '"); sb.append(this.session.toString()); sb.append("'; Connection: '"); sb.append(this.connection.toString()); sb.append("'; MessageProducer: '"); sb.append(this.sender.toString()); sb.append('\''); return sb.toString(); }
public static void writeMonitoringRecords(final AbstractMonitoringWriter writer, final int numRecords, final EmptyRecord record) { for (int i = 0; i < numRecords; i++) { writer.writeMonitoringRecord(record); } }
@Override public String toString() { final StringBuilder sb = new StringBuilder(64); sb.append(super.toString()); sb.append("\n\tConnected to pipe: '"); sb.append(this.pipe.getName()); sb.append('\''); return sb.toString(); }
@Override public final String toString() { final StringBuilder sb = new StringBuilder(128); sb.append(super.toString()).append("; Session: '").append(this.session.toString()).append("'; Connection: '").append(this.connection.toString()) .append("'; MessageProducer: '").append(this.sender.toString()).append('\''); return sb.toString(); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(64); sb.append(super.toString()). append("\n\tConnected to pipe: '").append(this.pipe.getName()). append('\''); return sb.toString(); }
@Override public final String toString() { final StringBuilder sb = new StringBuilder(256) // NOPMD (consecutive calls of append with string literals) .append("WriterController:").append("\n\tQueue type: ").append(this.writerQueue.getClass()) .append("\n\tQueue capacity: ").append(this.queueCapacity) .append("\n\tInsert behavior (a.k.a. QueueFullBehavior): ").append(this.insertBehavior.toString()) .append("\n"); if (this.monitoringWriter != null) { sb.append(this.monitoringWriter.toString()); } else { sb.append("\tNo Monitoring Writer available"); } sb.append('\n'); return sb.toString(); }
@Override public final String toString() { final StringBuilder sb = new StringBuilder(256) // NOPMD (consecutive calls of append with string literals) .append("WriterController:") .append("\n\tQueue type: ") .append(this.writerQueue) .append("\n\tQueue capacity: ") .append(this.queueCapacity) .append("\n\tInsert behavior (a.k.a. QueueFullBehavior): ") .append(this.insertBehavior.toString()) .append("\n"); if (this.monitoringWriter != null) { sb.append(this.monitoringWriter.toString()); } else { sb.append("\tNo Monitoring Writer available"); } sb.append('\n'); return sb.toString(); }