@ManagedAttribute public boolean getStableTaskRunning() { stable_task_lock.lock(); try { return stable_task_future != null && !stable_task_future.isDone() && !stable_task_future.isCancelled(); } finally { stable_task_lock.unlock(); } }
/** The number of messages in all Entry.sent_msgs tables (haven't received an ACK yet) */ @ManagedAttribute public int getNumUnackedMessages() { return accumulate(Table::size, send_table.values()); }
@ManagedAttribute(description="Current number of active threads in the thread pool") public int getThreadPoolSizeActive() { if(thread_pool instanceof ThreadPoolExecutor) return ((ThreadPoolExecutor)thread_pool).getActiveCount(); if(thread_pool instanceof ForkJoinPool) return ((ForkJoinPool)thread_pool).getRunningThreadCount(); return 0; }
@ManagedAttribute(description="Largest number of threads in the thread pool") public int getThreadPoolSizeLargest() { if(thread_pool instanceof ThreadPoolExecutor) return ((ThreadPoolExecutor)thread_pool).getLargestPoolSize(); return 0; }
/** * Determines whether the channel is in the connecting state; this means {@link Channel#connect(String)} has been * called, but hasn't returned yet * @return true if the channel is in the connecting state, false otherwise */ @ManagedAttribute public boolean isConnecting() {return ch.isConnecting();}
@ManagedAttribute(description="Total number of undelivered messages in all retransmit buffers") public int getXmitTableUndeliveredMsgs() { int num=0; for(Table<Message> buf: xmit_table.values()) num+=buf.size(); return num; }
@ManagedAttribute(description="Number of retransmit table compactions") public int getXmitTableNumCompactions() { Table<Message> table=local_addr != null? xmit_table.get(local_addr) : null; return table != null? table.getNumCompactions() : 0; }
@ManagedAttribute(description="Number of retransmit table purges") public int getXmitTableNumPurges() { Table<Message> table=local_addr != null? xmit_table.get(local_addr) : null; return table != null? table.getNumPurges(): 0; }
@ManagedAttribute(description="Number of ms a reader thread on a given connection can be idle (not receiving any messages) " + "until it terminates. New messages will start a new reader") public void readerIdleTime(long t) { this.reader_idle_time=t; server.readerIdleTime(t); }
@ManagedAttribute(description = "The average duration (in milliseconds) in processing the last propose message " + "received. This last propose message will originate the sending of the final message") public double getAvgLastProposeMessageReceivedDuration() { return statsCollector.getAvgLastProposeMessageReceivedDuration(); }
@ManagedAttribute(description="Number of currently open connections") public synchronized int getNumOpenConnections() { int retval=0; for(Connection conn: conns.values()) if(conn.isOpen()) retval++; return retval; }
@ManagedAttribute(description="Capacity of the retransmit buffer. Computed as xmit_table_num_rows * xmit_table_msgs_per_row") public long getXmitTableCapacity() { Table<Message> table=local_addr != null? xmit_table.get(local_addr) : null; return table != null? table.capacity() : 0; }
@ManagedAttribute(description="Number of retransmit table resizes") public int getXmitTableNumResizes() { Table<Message> table=local_addr != null? xmit_table.get(local_addr) : null; return table != null? table.getNumResizes(): 0; }
@ManagedAttribute(description = "The average number of unicasts messages created per anycast message") public double getAvgNumberOfUnicastSentPerAnycast() { return statsCollector.getAvgNumberOfUnicastSentPerAnycast(); } }
@ManagedAttribute(description="Returns stats about the current bundler") public String bundlerStats() { Map<String,Object> tmp=bundler != null? bundler.getStats() : null; return tmp != null? tmp.toString() : "n/a"; }
@ManagedAttribute(description="Average block time in ms (total block time / number of blockings)") public double getAverageBlockTime() { long block_time_ms=getTotalBlockTime(); return num_blockings == 0? 0.0 : block_time_ms / (double)num_blockings; }
@ManagedAttribute(description="Total number of missing (= not received) messages in all retransmit buffers") public int getXmitTableMissingMessages() { int num=0; for(Table<Message> buf: xmit_table.values()) num+=buf.getNumMissing(); return num; }
@ManagedAttribute(description="Prints the number of rows currently allocated in the matrix. This value will not " + "be lower than xmit_table_now_rows") public int getXmitTableNumCurrentRows() { Table<Message> table=local_addr != null? xmit_table.get(local_addr) : null; return table != null? table.getNumRows() : 0; }
@ManagedAttribute(description = "The average duration (in milliseconds) in processing a propose message received" + "(not the last one") public double getAvgProposeMessageReceivedDuration() { return statsCollector.getAvgProposeMesageReceivedDuration(); }
@ManagedAttribute(description="Are heartbeat tasks running") public boolean isRunning() { lock.lock(); try{ return isTimeoutCheckerRunning() && isHeartbeatSenderRunning(); } finally{ lock.unlock(); } }