Package com.hazelcast.osgi
Interface HazelcastOSGiService
public interface HazelcastOSGiService
Contract point for Hazelcast services on top of OSGI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property for disabling the behaviour that gives different cluster name to each Hazelcast bundle.static final StringSystem property for disabling the JSR-223 script engine scan by the Hazelcast OSGI service.static final StringSystem property for disabling the behaviour that registers created Hazelcast instances as OSGI service.static final StringSystem property for starting a default Hazelcast instance per Hazelcast OSGI bundle. -
Method Summary
Modifier and TypeMethodDescriptionGets all active/runningHazelcastOSGiInstances on the owner bundle.Gets the defaultHazelcastOSGiInstance.getHazelcastInstanceByName(String instanceName) Gets an existingHazelcastOSGiInstancewith itsinstanceName.getId()Gets the ID of service.org.osgi.framework.BundleGets the ownerBundleof this instance.Creates a newHazelcastOSGiInstanceon the owner bundle with default configuration.newHazelcastInstance(Config config) Creates a newHazelcastOSGiInstanceon the owner bundle with specified configuration.voidShuts down all runningHazelcastOSGiInstances on the owner bundle.voidShuts down the givenHazelcastOSGiInstanceon the owner bundle.
-
Field Details
-
HAZELCAST_OSGI_START
System property for starting a default Hazelcast instance per Hazelcast OSGI bundle.- See Also:
-
HAZELCAST_OSGI_REGISTER_DISABLED
System property for disabling the behaviour that registers created Hazelcast instances as OSGI service.- See Also:
-
HAZELCAST_OSGI_GROUPING_DISABLED
System property for disabling the behaviour that gives different cluster name to each Hazelcast bundle.- See Also:
-
HAZELCAST_OSGI_JSR223_DISABLED
System property for disabling the JSR-223 script engine scan by the Hazelcast OSGI service.- See Also:
-
-
Method Details
-
getId
String getId()Gets the ID of service.- Returns:
- the ID of service
-
getOwnerBundle
org.osgi.framework.Bundle getOwnerBundle()Gets the ownerBundleof this instance.- Returns:
- the owner
Bundleof this instance
-
getDefaultHazelcastInstance
HazelcastOSGiInstance getDefaultHazelcastInstance()Gets the defaultHazelcastOSGiInstance.- Returns:
- the default
HazelcastOSGiInstance
-
newHazelcastInstance
Creates a newHazelcastOSGiInstanceon the owner bundle with specified configuration.- Parameters:
config- Configuration for the newHazelcastOSGiInstance(member)- Returns:
- the new
HazelcastOSGiInstance
-
newHazelcastInstance
HazelcastOSGiInstance newHazelcastInstance()Creates a newHazelcastOSGiInstanceon the owner bundle with default configuration.- Returns:
- the new
HazelcastOSGiInstance
-
getHazelcastInstanceByName
Gets an existingHazelcastOSGiInstancewith itsinstanceName.- Parameters:
instanceName- Name of theHazelcastOSGiInstance(member)- Returns:
- an existing
HazelcastOSGiInstance
-
getAllHazelcastInstances
Set<HazelcastOSGiInstance> getAllHazelcastInstances()Gets all active/runningHazelcastOSGiInstances on the owner bundle.- Returns:
- all active/running
HazelcastOSGiInstances on the owner bundle
-
shutdownHazelcastInstance
Shuts down the givenHazelcastOSGiInstanceon the owner bundle.- Parameters:
instance- theHazelcastOSGiInstanceto shut down
-
shutdownAll
void shutdownAll()Shuts down all runningHazelcastOSGiInstances on the owner bundle.
-