com.gemstone.gemfire.distributed
Class Locator

Represents a distribution locator server that provides discovery information
to members and clients of a GemFire distributed system. In most GemFire
distributed cache architectures, distribution locators are run in their own
process. A stand-alone locator process is managed using the GemFire console,
administration
API, or the gemfire command line utility:

$ gemfire start-locator

The stand-alone locator configuration provides high-availability of the
membership information.

This class allows a GemFire application VM to host a distribution locator.
Such a configuration minimizes the number of processes that are required to
run GemFire. However, hosting distribution locators is not generally
recommended because if the application VM exits, the primary membership list
for the distributed system would be lost and it would not be possible for new
applications to connect to the distributed system.

It is important to remember that an application that hosts a distribution
locator must start its locator before it (or any other potential member)
connects to the distributed system.

Locator

startLocator

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.

The locator will not start a distributed system. The locator
will provide peer location services only.

Parameters:

port - The port on which the locator will listen for membership
information requests from new members

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 -dir option to
the gemfire command).

startLocatorAndDS

Starts a new distribution locator host by this VM, and an admin distributed
system controlled by the locator. The locator's listening sockets will bind
to all network addresses. The locator will use the given properties to
start an AdminDistributedSystem.

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.

Parameters:

port - The port on which the locator will listen for membership
information requests from new members

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 -dir option to
the gemfire command).

distributedSystemProperties - The properties used to configure the locator's distributed
system. If there are multiple locators in the system, this
should note them in the "locators" setting. If The
distributed system is using multicast, the "mcast-port"
should also be set.

startLocatorAndDS

Starts a new distribution locator host by this VM that binds to the given
network address.

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.

Parameters:

port - The port on which the locator will listen for membership
information requests from new members

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 -dir option to
the gemfire command).

bindAddress - The IP address to which the locator's socket binds

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.

Starts a new distribution locator host by this VM that binds to the given
network address.

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.

Parameters:

port - The port on which the locator will listen for membership
information requests from new members

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 -dir option to
the gemfire command).

bindAddress - The IP address to which the locator's socket binds

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.

peerLocator - True if the locator should provide membership information to
peers in the distributed system.

serverLocator - True if the locator should provide information about cache
servers to clients connecting to the distributed system.

hostnameForClients - the name to give to clients for connecting to this locator

port - the tcp/ip port that the locator should listen on. This is the
port number that applications will refer to in their locators property
in gemfire.properties

bind-address - the tcp/ip address that the locator should bind to. This
can be missing or be an empty string, which causes the locator to listen
on all host addresses.

gemfire-properties-file - the location of a gemfire.properties file to be
used in configuring the locator's distributed system. This can be missing
or be an empty string, which will cause the locator to use the default
search for gemfire.properties.