Package com.gigaspaces.internal.service
Class AbstractGigaSpacesService
java.lang.Object
com.gigaspaces.internal.service.AbstractGigaSpacesService
- All Implemented Interfaces:
ILRMIService,ServiceProxyAccessor,Remote
- Direct Known Subclasses:
AbstractService,ReplicationProxyGigaSpacesService
public abstract class AbstractGigaSpacesService
extends Object
implements Remote, ServiceProxyAccessor, ILRMIService
Base class for GigaSpaces Services that supports registration in Jini Lookup Service.
- Since:
- 8.0.3
- Author:
- Niv Ingberg
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longWait for 60 seconds for any attributes change -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGigaSpacesService(LifeCycle lifeCycle) protectedAbstractGigaSpacesService(LifeCycle lifeCycle, Uuid serviceUuid) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLookupAttributes(Entry[] attributes) Add attributes to the collection of attributes the JoinManager utility maintains.voidaddLookupAttributes(Entry[] attributes, long timeoutInMillis) Add the lookup attributes with a specified timeout to wait for the request to complete.protected voidAppendInitialLookupAttributes(List<Entry> lookupAttributes) protected static ExporterReturns an instance of Exporter.abstract Stringprotected StringgetUuid()voidmodifyLookupAttributes(Entry[] attrSetTemplates, Entry[] attrSets) Modify the current attribute sets.voidregisterLookupService(String[] lookupGroups, LookupLocator[] lookupLocators, DiscoveryListener listener, boolean useSharedLeaseRenewalManager) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.jini.start.ServiceProxyAccessor
getServiceProxy
-
Field Details
-
SERVICE_ATTRIBUTE_MODIFY_AWAIT
public static final long SERVICE_ATTRIBUTE_MODIFY_AWAITWait for 60 seconds for any attributes change- See Also:
-
-
Constructor Details
-
AbstractGigaSpacesService
-
AbstractGigaSpacesService
-
-
Method Details
-
getUuid
-
getLifeCycle
-
getServiceName
- Specified by:
getServiceNamein interfaceILRMIService
-
getJoinManager
-
addLookupAttributes
Add attributes to the collection of attributes the JoinManager utility maintains. If the service is not advertised, the new attribute will be added to the local collection of attributes. NOTE: This method is not thread safe - it should no be called concurrently with register/unregister.- Parameters:
attributes- - Array of Entry attributes
-
addLookupAttributes
public void addLookupAttributes(Entry[] attributes, long timeoutInMillis) throws InterruptedException Add the lookup attributes with a specified timeout to wait for the request to complete.- Throws:
InterruptedException- if this request was interrupted while waiting for completion- Since:
- 12.1.1
-
modifyLookupAttributes
Modify the current attribute sets. The resulting set will be used for all future joins. The same modifications are also made to all currently-joined lookup services. NOTE: This method is not thread safe - it should no be called concurrently with register/unregister.- Parameters:
attrSetTemplates- the templates for matching attribute setsattrSets- the modifications to make to matching sets
-
registerLookupService
public void registerLookupService(String[] lookupGroups, LookupLocator[] lookupLocators, DiscoveryListener listener, boolean useSharedLeaseRenewalManager) throws ServiceRegistrationException - Throws:
ServiceRegistrationException
-
unregisterFromLookupService
public void unregisterFromLookupService() -
getServiceTypeDescription
-
AppendInitialLookupAttributes
protected void AppendInitialLookupAttributes(List<Entry> lookupAttributes) throws ServiceRegistrationException - Throws:
ServiceRegistrationException
-
getExporter
Returns an instance of Exporter. Loads Jini configuration (services.config by default) and creates the relevant exporter (which is GenericExporter by default).
-