/** * Returns information about distributed search options. * * @return Distributed search information. */ public DistributedConfiguration getDistributedConfiguration() { return new DistributedConfiguration(this); }
/** * Indicates whether distributed search is enabled. * * @return {@code true} if distributed search is enabled, {@code false} if * disabled. */ public boolean isDistSearchEnabled() { return getBoolean("dist_search_enabled", true); }
/** * Returns the time-out period for trying to read and receive data from a * search peer. * * @return The receive time-out period, in seconds, or -1 if not specified. */ public int getReceiveTimeout() { return getInteger("receiveTimeout", -1); }
/** * Sets the server recheck frequency. * <p> * <b>Note:</b> This attribute is only relevant when * {@code removeTimedOutServers} is set to {@code true}--otherwise, this * attribute is ignored. * @see #getRemovedTimedOutServers * * @param frequency The server recheck frequency, in seconds. If set to 0, a * recheck does not occur. */ public void setCheckTimedOutServersFrequency(int frequency) { setCacheValue("checkTimedOutServersFrequency", frequency); }
/** * Returns a list of peer servers. * * @return The comma-separated list of peer servers, or {@code null} if not * available. */ public String getServers() { return getString("servers", null); }
/** * Enable distributed search on this Splunk instance. * * Requires restarting Splunk before it takes effect. */ @Override public void enable() { Args args = new Args(); args.put("disabled", "0"); update(args); }
/** * Sets the initial peer server list. You don't need to set servers here * if you are operating completely in {@code autoAddServers} mode * (discovered servers are automatically added). * * @param servers A comma-separated list of peer servers. */ public void setServers(String servers) { setCacheValue("servers", servers); }
/** * Returns a list of server names that are excluded from being peers. * * @return A comma-separated list of excluded servers by name, or * {@code null} if not available. */ public String getBlacklistNames() { return getString("blacklistNames", null); }
/** * Disable distributed search on this Splunk instance. * * Requires restarting Splunk before it takes effect. */ @Override public void disable() { Args args = new Args(); args.put("disabled", "1"); update(args); }
/** * Sets the blacklist server names that are excluded from being peers. * * @param names A comma-separated list of server names. */ public void setBlacklistNames(String names) { setCacheValue("blacklistNames", names); }
/** * Returns the time-out period for trying to write or send data to a search * peer. * * @return The send time-out period, in seconds, or -1 if not specified. */ public int getSendTimeout() { return getInteger("sendTimeout", -1); }
/** * Returns a list of server URLs that are excluded from being peers. * * @return A comma-separated list of excluded servers by URL in the * format "x.x.x.x:port", or {@code null} if not available. */ public String getBlacklistUrls() { return getString("blacklistURLs", null); }
/** * Indicates whether timed-out servers are removed from the distributed * configuration. * * @return {@code true} if timed-out servers are removed from the * distributed configuration, {@code false} if not. */ public boolean getRemovedTimedOutServers() { return getBoolean("removedTimedOutServers", false); }
/** * Sets the time-out period for reading and receiving data from a search * peer. * * @param seconds The receive time-out period, in seconds. */ public void setReceiveTimeout(int seconds) { setCacheValue("receiveTimeout", seconds); }
/** * Returns the time-out period for connecting to search peers. * * @return The connection time-out period, in seconds, or -1 if not * specified. */ public int getConnectionTimeout() { return getInteger("connectionTimeout", -1); }
/** * Indicates whether this server uses bundle replication to share * search-time configuration with search peers. * <p> * <b>Note:</b> If set to {@code false}, the search head assumes that the * search peers can access the correct bundles using an NFS share. * * @return {@code true} if this server uses bundle replication, * {@code false} if not. */ public boolean getShareBundles() { return getBoolean("shareBundles", true); }
/** * Sets the time-out period for connecting to a search peer for getting its * basic information. * * @param seconds The connection time-out period, in seconds. * @see ServiceInfo */ public void setStatusTimeout(int seconds) { setCacheValue("statusTimeout", seconds); }
/** * Returns the frequency at which servers that have timed out are rechecked. * If {@code removeTimedOutServers} is false, this setting has no effect. * * @return The frequency, in seconds, to recheck timed-out servers. If 0, * servers are not rechecked. The default is 60 seconds. */ public int getCheckTimedOutServersFrequency() { return getInteger("checkTimedOutServersFrequency", 60); }
/** * Sets the time-out period for establishing a search peer connection. * * @param seconds The connection time-out period, in seconds. */ public void setConnectionTimeout(int seconds) { setCacheValue("connectionTimeout", seconds); }
/** * Returns the time-out period for gathering a search peer's basic information. * * @return The time-out period, in seconds. * @see ServiceInfo */ public int getStatusTimeout() { return getInteger("statusTimeout", 10); }