@Property(description="Number of unicast receiver threads, all reading from the same DatagramSocket. " + "If de-serialization is slow, increasing the number of receiver threads might yield better performance.") public int getUcastReceiverThreads() { return unicast_receiver_threads; }
/** Moves contents of matrix num_rows down. Avoids a System.arraycopy(). Caller must hold the lock. */ @GuardedBy("lock") protected void move(int num_rows) { if(num_rows <= 0 || num_rows > matrix.length) return; int target_index=0; for(int i=num_rows; i < matrix.length; i++) matrix[target_index++]=matrix[i]; for(int i=matrix.length - num_rows; i < matrix.length; i++) matrix[i]=null; num_moves++; }
/** * Allows to unblock all blocked senders from an external program, e.g. JMX */ @ManagedOperation(description="Unblocks all senders") public void unblock() { ; }
@ManagedAttribute(description="Sets the size of the remove queue; creates a new remove queue") public void rqbRemoveQueueSize(int size) { if(size == queue_size) return; queue_size=size; remove_queue=new Message[queue_size]; }
@Property(description="Number of multicast receiver threads, all reading from the same MulticastSocket. " + "If de-serialization is slow, increasing the number of receiver threads might yield better performance.") public int getMcastReceiverThreads() { return multicast_receiver_threads; }
@GuardedBy("deliverySet") private View getAndSetView(View newView) { View oldView = currentView; currentView = newView; return oldView; }
@ManagedOperation public void resetStats() { request_msgs=response_msgs=bcasts_sent=bcasts_received=bcasts_delivered=0L; sent_requests=received_requests=sent_responses=received_responses=0L; // reset number of sent and received requests and responses }
@ManagedAttribute(description="Whether or not to log suspect messages") public boolean isLogSuspectedMessages() { return log_suspected_msgs; } public void setLogSuspectedMessages(boolean log_suspected_msgs) {
@Property public void setFixedMembersSeparator(String value) { fixed_members_seperator = value; }
/** Computes and returns the row index for seqno. The caller must hold the lock. */ // Note that seqno-offset is never > Integer.MAX_VALUE and thus doesn't overflow into a negative long, // as offset is always adjusted in resize() or compact(). Even if it was negative, callers of computeRow() will // ignore the result or throw an ArrayIndexOutOfBound exception @GuardedBy("lock") protected int computeRow(long seqno) { int diff=(int)(seqno-offset); if(diff < 0) return diff; return diff / elements_per_row; }
@ManagedOperation(description="Sets the bypass flag") public boolean setBypass(boolean flag) { boolean ret=bypass; bypass=flag; return ret; }
@ManagedAttribute(description="Number of credit requests sent") public int getNumberOfCreditRequestsSent() { return num_credit_requests_sent; }
@GuardedBy("lock") protected boolean decrement(long credits) { if(credits_left - credits >= 0) { credits_left-=credits; return true; } return false; } }
@ManagedOperation public void setRelay(boolean relay) { this.relay=relay; }
@ManagedAttribute public long getTotalTimeInFlush() { return totalTimeInFlush; }
/** Computes and returns the index within a row for seqno */ // Note that seqno-offset is never > Integer.MAX_VALUE and thus doesn't overflow into a negative long, // as offset is always adjusted in resize() or compact(). Even if it was negative, callers of computeIndex() will // ignore the result or throw an ArrayIndexOutOfBound exception @GuardedBy("lock") protected int computeIndex(long seqno) { int diff=(int)(seqno - offset); if(diff < 0) return diff; return diff & (elements_per_row - 1); // same as mod, but (apparently, I'm told) more efficient }
@ManagedOperation public void resetStats() { forwarded_msgs=bcast_msgs=received_forwards=received_bcasts=delivered_bcasts=0L; }
@ManagedAttribute public int getNumberOfFlushes() { return numberOfFlushes; }
@ManagedAttribute(description="Whether or not the current instance is the coordinator") public boolean isCoord() { return impl instanceof CoordGmsImpl; }
@ManagedAttribute public double getAverageFlushDuration() { return averageFlushDuration; }