IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.osgi
Interface ObjectGridOSGiManager


public interface ObjectGridOSGiManager

An ObjectGridOSGiManager is responsible for querying and managing the OSGi services currently used for an ObjectGrid instance.

This API is useful in the case that the user application can directly access the ObjectGrid instances. Users can directly access the client ObjectGrid instances and local ObjectGrid instances using ObjectGridManager interface. Users can also access server-side ObjectGrid instances using user plug-ins running in the container server, for example, ObjectGridEventGroup.ShardEvents.

Use the OSGiManagerFactory.getOSGiManager(ObjectGrid objectGrid) method to get an instance of ObjectGridOSGiManager.

Since:
7.1.1

Method Summary
 Integer getRanking(String serviceName)
          Get the current ranking for a specific service used by a grid
 Map<String,Integer> getRankings()
          Get the current service rankings for all services used by an ObjectGrid.
 void useRanking(Map<String,Integer> serviceRankings)
          To use a set of services with specific rankings.
 void useRanking(String serviceName, Integer ranking)
          To use the service for a specific ranking.
 

Method Detail

getRanking

Integer getRanking(String serviceName)
Get the current ranking for a specific service used by a grid

Parameters:
serviceName - the service name
Returns:
the current used service ranking for that ObjectGrid

getRankings

Map<String,Integer> getRankings()
Get the current service rankings for all services used by an ObjectGrid.

Returns:
a map of currently used service rankings. The key of the map is the service name, and the value of the map is the service ranking.

useRanking

void useRanking(String serviceName,
                Integer ranking)
                throws ServiceNotAvailableException,
                       ServiceUpdateException
To use the service for a specific ranking.

This method can only be called when the ObjectGrid type is a CLIENT type or a LOCAL type. You can get the ObjectGrid type using the ObjectGrid.getObjectGridType() method.

This method might be removed when the API is finalized.

Parameters:
serviceName - the OSGi service name
ranking - the service ranking to be used
Throws:
ServiceNotAvailableException - thrown when that specified service ranking of the service is not available
ServiceUpdateException - thrown when the specified OSGi service version is available, but the service update fails.

useRanking

void useRanking(Map<String,Integer> serviceRankings)
                throws ServiceNotAvailableException,
                       ServiceUpdateException
To use a set of services with specific rankings.

This method can only be called when the ObjectGrid type is a CLIENT type or a LOCAL type. You can get the ObjectGrid type using the ObjectGrid.getObjectGridType() method.

This method might be removed when the API is finalized.

Parameters:
serviceRankings - A map of the used service rankings to be used. The key of the map is the service name, and value of the map is the service version to be used.
Throws:
ServiceNotAvailableException - thrown when that specified version of the service is not available
ServiceUpdateException - thrown when the specified OSGi service version is available, but the service update fails.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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