/** * Starts a new distribution locator host by this VM. The locator will look for a * gemfire.properties file, or equivalent system properties to fill in the gaps in its * configuration. * <p> * The locator will not start a distributed system. The locator will provice peer location * services only. * * @param port The port on which the locator will listen for membership information requests from * new members * @param logFile The file to which the locator logs information. The directory that contains the * log file is used as the output directory of the locator (see <code>-dir</code> option to * the <code>gemfire</code> command). * @param bindAddress The IP address to which the locator's socket binds * * @throws IllegalArgumentException If <code>port</code> is not in the range 0 to 65536 * @throws org.apache.geode.SystemIsRunningException If another locator is already running in * <code>outputDir</code> * @throws org.apache.geode.GemFireIOException If the directory containing the * <code>logFile</code> does not exist or cannot be written to * @throws IOException If the locator cannot be started * @deprecated as of 7.0 use startLocatorAndDS instead. */ public static Locator startLocator(int port, File logFile, InetAddress bindAddress) throws IOException { return startLocator(port, logFile, false, bindAddress, (Properties) null, true, true, null); }
/** * Starts a new distribution locator host by this VM. The locator's listening sockets will bind to * all network addresses. The locator will look for a gemfire.properties file, or equivalent * system properties to fill in the gaps in its configuration. If you are using multicast * communications, the locator should be configured with the same settings that your applications * will use. * <p> * The locator will not start a distributed system. The locator will provide peer location * services only. * * @param port The port on which the locator will listen for membership information requests from * new members * @param logFile The file to which the locator logs information. The directory that contains the * log file is used as the output directory of the locator (see <code>-dir</code> option to * the <code>gemfire</code> command). * * @throws IllegalArgumentException If <code>port</code> is not in the range 0 to 65536 * @throws org.apache.geode.SystemIsRunningException If another locator is already running in * <code>outputDir</code> * @throws org.apache.geode.GemFireIOException If the directory containing the * <code>logFile</code> does not exist or cannot be written to * @throws IOException If the locator cannot be started * @deprecated as of 7.0 use startLocatorAndDS instead. */ public static Locator startLocator(int port, File logFile) throws IOException { return startLocator(port, logFile, false, (InetAddress) null, (Properties) null, true, true, null); }
/** * Starts a new distribution locator host by this VM that binds to the given network address. * <p> * The locator starts a AdminDistributedSystem configured with the given properties to provide the * system with a long-running process that can be relied on for stable membership information. The * locator will provide provide peer and cache server location services. * * @since GemFire 5.0 * * @param port The port on which the locator will listen for membership information requests from * new members * @param logFile The file to which the locator logs information. The directory that contains the * log file is used as the output directory of the locator (see <code>-dir</code> option to * the <code>gemfire</code> command). * @param bindAddress The IP address to which the locator's socket binds * @param dsProperties The properties used to configure the locator's DistributedSystem. If there * are multiple locators, the "locators" property should be set. If multicast is being * used, the "mcast-port" property should be set. * * @throws IllegalArgumentException If <code>port</code> is not in the range 0 to 65536 * @throws org.apache.geode.SystemIsRunningException If another locator is already running in * <code>outputDir</code> * @throws org.apache.geode.GemFireIOException If the directory containing the * <code>logFile</code> does not exist or cannot be written to * @throws IOException If the locator cannot be started */ public static Locator startLocatorAndDS(int port, File logFile, InetAddress bindAddress, java.util.Properties dsProperties) throws IOException { return startLocator(port, logFile, bindAddress, dsProperties, true, true, null); }
Properties distributedSystemProperties) throws IOException { return startLocator(port, logFile, (InetAddress) null, distributedSystemProperties, true, true, null);
java.util.Properties dsProperties, boolean peerLocator, boolean serverLocator, String hostnameForClients) throws IOException { return startLocator(port, logFile, bindAddress, dsProperties, true, true, hostnameForClients);