com.gigaspaces.grid.space
Class SpaceHandler
java.lang.Object
com.gigaspaces.grid.space.SpaceHandler
- All Implemented Interfaces:
- org.jini.rio.core.jsb.ServiceBeanFactory
public class SpaceHandler
- extends java.lang.Object
- implements org.jini.rio.core.jsb.ServiceBeanFactory
Provides support to create a GigaSpaces instance using SpaceFinder. This
utility extracts properties from the
ServiceBeanContext
and derives the GigaSpace
context for use with the SpaceFinder. The following properties are used to
derive the SpaceFinder context.
The SpaceFinder is invoked using the following method:
SpaceFinder.find(String spaceUrl,
IJSpace space,
Properties customProperties,
LifeCycle lifeCycle);
Parameter specifics :
- The spaceUrl parameter takes on the following format:
"/./spaceName", where spaceName is derived as follows:
If gs.space.url.arg.spaceName is declared, this value is
used as the space name instead of the name of the
<ServiceBean Name="name"> property
- The IJSpace parameter is always null
- The customProperties parameter is obtained
from the declaration of <Parameter> elements in the
deployment descriptor and other <ServiceBean> properties:
- The gs.space.url.arg.groups is derived from the
<Groups> element
- If the schema declared as the value for the
gs.space.url.arg.cluster_schema property contains the string
partitioned-sync2backup, the following behavior is used:
- The gs.space.url.arg.id is set to be the partition
number, as
determined by the suffix of the
<ServiceBean Name="name">
property. This value is expected to be in the form of
space-name.partition-number
- The gs.space.url.arg.backup_id value is set to be the
value of
the instanceID (as determined from
ServiceBeanConfig.getInstanceID()
)
-1, iff the instanceID > 0
- If there is no schema declared, or it is not a
partitioned-sync2backup, the following behavior is used:
- The gs.space.url.arg.id is set to be the value of the
instanceID
- If the gs.space.url.arg.total_members property is not
supplied, it is set to be the max between the number of planned
services (as determined by the <Maintain> element) and
the ScalingPolicyHandler.MaxServices property.
- If the gs.space.url.arg.properties property is
supplied and the property value starts with http://*/,
the http:// value will be derived to be the configured codebase
of the service
- The LifeCycle parameter is set to be the value
obtained from the
ServiceBeanManager.getDiscardManager()
- See Also:
ServiceBeanFactory
Nested classes/interfaces inherited from interface org.jini.rio.core.jsb.ServiceBeanFactory |
org.jini.rio.core.jsb.ServiceBeanFactory.Created |
Method Summary |
org.jini.rio.core.jsb.ServiceBeanFactory.Created |
create(org.jini.rio.core.jsb.ServiceBeanContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpaceHandler
public SpaceHandler()
create
public org.jini.rio.core.jsb.ServiceBeanFactory.Created create(org.jini.rio.core.jsb.ServiceBeanContext context)
throws org.jini.rio.core.JSBInstantiationException
- Specified by:
create
in interface org.jini.rio.core.jsb.ServiceBeanFactory
- Throws:
org.jini.rio.core.JSBInstantiationException
- See Also:
ServiceBeanFactory.create(org.jini.rio.core.jsb.ServiceBeanContext)
Copyright (c) 2007 GigaSpaces Technologies, Inc.
All Rights Reserved.