IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.osgi
Interface OSGiServiceRepository


public interface OSGiServiceRepository

The eXtreme Scale runtime tracks all the services that are configured as user plug-ins. An OSGiServiceRepository object tracks these services and their service rankings that are available to the eXtreme Scale runtime in this process, and the service rankings in use.

Users can use OSGiManagerFactory.getOSGiServiceRepository() method to get an instance of OSGiServiceRepository.

Since:
7.1.1

Nested Class Summary
static class OSGiServiceRepository.OSGiServiceKey
          The name of the entities that each OSGi Service is scoped to.
 
Method Summary
 Map<OSGiServiceRepository.OSGiServiceKey,Map<String,Integer>> getAllCurrentlyUsedRankings()
          Get currently used service rankings for all the OSGi services.
 Map<String,Collection<Integer>> getAllRankings()
          Get all available service rankings for all the OSGi services
 Collection<Integer> getAllRankings(String serviceName)
          Get all available service rankings for the OSGi service.
 Map<OSGiServiceRepository.OSGiServiceKey,Integer> getCurrentlyUsedRankings(String serviceName)
          Get all currently used service rankings for the specified OSGi service.
 Map<String,Integer> retrieveServiceAvailability(Map<String,Integer> serviceRankings)
          Check if the specified service rankings are available or not.
 

Method Detail

getAllRankings

Collection<Integer> getAllRankings(String serviceName)
Get all available service rankings for the OSGi service.

Parameters:
serviceName - the OSGi service name
Returns:
a collection of all available service rankings for that service.

getAllRankings

Map<String,Collection<Integer>> getAllRankings()
Get all available service rankings for all the OSGi services

Returns:
a map of available service rankings. The key of the map is the service name, and the value is a collection of available service rankings for that service.

getCurrentlyUsedRankings

Map<OSGiServiceRepository.OSGiServiceKey,Integer> getCurrentlyUsedRankings(String serviceName)
Get all currently used service rankings for the specified OSGi service.

Parameters:
serviceName - the OSGi service name
Returns:
A map of the currently used service rankings. The key of the map is the name of the ObjectGrid name and MapSet that uses the service, and the value of the map is the service ranking being used.

getAllCurrentlyUsedRankings

Map<OSGiServiceRepository.OSGiServiceKey,Map<String,Integer>> getAllCurrentlyUsedRankings()
Get currently used service rankings for all the OSGi services.

Returns:
a map of currently used service rankings for all the services. The key of the map is the ObjectGrid and MapSet name, and the value of is a sub-map, where the key of the sub-map is the service name, and the value of is the service ranking being used.

retrieveServiceAvailability

Map<String,Integer> retrieveServiceAvailability(Map<String,Integer> serviceRankings)
Check if the specified service rankings are available or not.

Parameters:
serviceRankings - a map of service rankings. The key of the map is the service name, and the value is a collection of rankings for that service.
Returns:
null if the specified service rankings are all available; otherwise a map that contains unavailable service rankings.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.