/** * Allows to unblock all blocked senders from an external program, e.g. JMX */ @ManagedOperation(description="Unblocks all senders") public void unblock() { ; }
@ManagedOperation(description="Removes all entries from the fragmentation table. " + "Dangerous: this might remove fragments that are still needed to assemble an entire message") public void clearAllFragments() { fragment_list.clear(); }
/** * This method is public only so it can be invoked by unit testing, but should not otherwise be used ! */ @ManagedOperation(description="Trashes all connections to other nodes. This is only used for testing") public void removeAllConnections() { send_table.clear(); recv_table.clear(); }
@ManagedOperation public String printPreviousViews() { StringBuilder sb=new StringBuilder(); for(String view_rep: prev_views) sb.append(view_rep).append("\n"); return sb.toString(); }
@ManagedOperation(description="Print suspect history") public String printSuspectHistory() { StringBuilder sb=new StringBuilder(); for(String addr: suspect_history) sb.append(addr).append("\n"); return sb.toString(); }
@ManagedOperation(description="Dumps all counters") public String printCounters() { StringBuilder sb=new StringBuilder(); for(Map.Entry<String,VersionedValue> entry: counters.entrySet()) sb.append(entry.getKey()).append(": ").append(entry.getValue()).append("\n"); return sb.toString(); }
@ManagedOperation(description="Prints all stubs and the reconnect list") public String print() { RouterStubManager mgr=stubManager; return mgr != null? mgr.print() : "n/a"; }
@ManagedOperation(description="Prints the reconnect list") public String printReconnectList() { RouterStubManager mgr=stubManager; return mgr != null? mgr.printReconnectList() : "n/a"; }
@ManagedOperation public void stopGui() { if(discard_dialog != null) discard_dialog.dispose(); discard_dialog=null; }
/** * Removes key in all nodes in the cluster, both from their local hashmaps and L1 caches * @param key The key, needs to be serializable */ @ManagedOperation public void remove(K key) { remove(key, false); // by default we use asynchronous removals }
@ManagedOperation public String dumpViewHandlerQueue() { return view_handler.dumpQueue(); } @ManagedOperation
/** Runs the reaper every interval ms, evicts expired items */ @ManagedOperation public void enableReaping(long interval) { if(task != null) task.cancel(false); task=timer.scheduleWithFixedDelay(new Reaper(), 0, interval, TimeUnit.MILLISECONDS); }
@ManagedOperation(description="Dumps all pending requests") public String dumpPendingRequests() { StringBuilder sb=new StringBuilder(); for(Tuple<Request,Promise> tuple: pending_requests.values()) { Request tmp=tuple.getVal1(); sb.append(tmp + " (" + tmp.getClass().getCanonicalName() + ") "); } return sb.toString(); }
@ManagedOperation public void stop() throws IOException { Util.close(srv_sock); thread=null; if(thread_pool instanceof ExecutorService) ((ExecutorService)thread_pool).shutdown(); }
@ManagedOperation(description="Prints suspect history") public String printSuspectHistory() { StringBuilder sb=new StringBuilder(); for(Tuple<Address,Long> tmp: suspect_history) { sb.append(new Date(tmp.getVal2())).append(": ").append(tmp.getVal1()).append("\n"); } return sb.toString(); }
@ManagedOperation(description="Sends information about my cache to everyone but myself") public void sendCacheInformation() { List<Address> current_members=new ArrayList<>(view.getMembers()); disseminateDiscoveryInformation(current_members, null, current_members); }
@ManagedOperation(description="Clears the cache for dropped messages") public void clearDroppedMessagesCache() { if(suppress_log_out_of_buffer_space != null) suppress_log_out_of_buffer_space.getCache().clear(); }
/** Clears the cache. <em>Do not use, this is only for unit testing !</em> */ @ManagedOperation(description="Clears the logical address cache; only used for testing") public void clearLogicalAddressCache() { logical_addr_cache.clear(true); fetchLocalAddresses(); }
@ManagedOperation(description="Triggers a request for the secret key to the current keyserver") public void sendKeyRequest() { if(key_server_addr == null) { log.debug("%s: sending secret key request failed as the key server is currently not set", local_addr); return; } sendKeyRequest(key_server_addr); }
@ManagedOperation public V get(K key) { if(log.isTraceEnabled()) log.trace("get(" + key + ")"); Value<V> val=map.get(key); if (isExpired(val)) { map.remove(key); return null; } return getValue(val); }