Summary: Using
SpaceFinder to search for clustered space/cache instances in the network.
OverviewGigaSpaces provides the SpaceFinder class that can be used to locate spaces on the network. The SpaceFinder takes a URL string or an array of URL strings as a parameter, and tries to locate a space according to the URL value and order (when using an array of URLs). When a space belongs to a failover or load-balancing group in a cluster, it registers a clustered proxy rather than a regular cluster in directory services like JNDI and Jini Lookup Service. When writing an application against a GigaSpaces cluster, it is sometimes necessary to find an arbitrary space in the cluster based on the cluster name or group, rather than to specify the space name explicitly. This results in more flexibility, since it unties the application from a specific space member, and increases availability whenever a particular space member is unavailable. For this reason, the includes lookup of a space member that belongs to a cluster. The following are common URLs you can use to look up a proxy of a space that belongs to cluster C and group G: jini://<host>/*/*?clustername=C jini://<host>/*/*?clustername=C&clustergroup=G These URLs are uncoupled from a specific container or space name (the '*' is a wildcard replacement). The clustergroup parameter can be used to limit the search to a specific failover group. For example, to find a proxy in cluster C using Jini multicast discovery, use the following URL: jini://*/*/*?clustername=C You may also define multiple spaces URL using semi colon separated URLs. The SpaceFinder tries to locate the space according to the order of the URLs. The first space proxy found is returned to the caller. For example: rmi://host1/container1/space1;rmi://host2/container2/space2;rmi://host3/container3/space3
|
![]() |
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence |