|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jini.reggie.GigaRegistrar
public class GigaRegistrar
Base server-side implementation of a lookup service, subclassed by TransientRegistrarImpl and PersistentRegistrarImpl. Multiple client-side proxy classes are used, for the ServiceRegistrar interface as well as for leases and administration; their methods transform the parameters and then make corresponding calls on the Registrar interface implemented on the server side.
| Constructor Summary | |
|---|---|
GigaRegistrar(String[] configArgs,
LifeCycle lifeCycle)
Constructs RegistrarImpl based on a configuration obtained using the provided string arguments. |
|
| Method Summary | |
|---|---|
void |
addAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSets)
Adds the specified attribute sets (those that aren't duplicates of existing attribute sets) to the registered service item. |
void |
addLookupAttributes(Entry[] attrSets)
Add attribute sets for the service. |
void |
addLookupGroups(String[] groups)
Add new groups to the set to join. |
void |
addLookupLocators(LookupLocator[] locators)
Add locators for specific new lookup services to join. |
void |
addMemberGroups(String[] groups)
Adds the given set of names to the set whose elements are the names of the groups in which the lookup service is currently a member. |
void |
cancelEventLease(long eventID,
Uuid leaseID)
Cancels an event lease. |
Exception[] |
cancelLeases(Object[] regIDs,
Uuid[] leaseIDs)
Cancels service and event leases from a LeaseMap. |
void |
cancelServiceLease(ServiceID serviceID,
Uuid leaseID)
Cancels a service lease. |
void |
destroy()
Destroy the service, if possible, including its persistent storage. |
void |
disableLRMIMonitoring()
|
byte[] |
dumpBytes(String file,
long from,
int length)
|
void |
enableLRMIMonitoring()
|
com.gigaspaces.lrmi.LRMIMonitoringDetails |
fetchLRMIMonitoringDetails()
|
com.gigaspaces.internal.dump.InternalDumpResult |
generateDump(String cause,
Map<String,Object> context)
|
com.gigaspaces.internal.dump.InternalDumpResult |
generateDump(String cause,
Map<String,Object> context,
String... contributors)
|
Object |
getAdmin()
Returns an object that implements whatever administration interfaces are appropriate for the particular service. |
int |
getAgentId()
|
long |
getCurrentTimestamp()
|
EntryClassBase[] |
getEntryClasses(Template tmpl)
Looks at all service items that match the specified template, finds every entry (among those service items) that either doesn't match any entry templates or is a subclass of at least one matching entry template, and returns the set of the (most specific) classes of those entries. |
Object[] |
getFieldValues(Template tmpl,
int setIndex,
int field)
Looks at all service items that match the specified template, finds every entry (among those service items) that matches tmpl.attributeSetTemplates[setIndex], and returns the set of values of the specified field of those entries. |
String |
getGSAServiceID()
|
com.gigaspaces.internal.jvm.JVMDetails |
getJVMDetails()
|
com.gigaspaces.internal.jvm.JVMStatistics |
getJVMStatistics()
|
LookupLocator |
getLocator()
Returns a LookupLocator that can be used if necessary for unicast discovery of the lookup service. |
Entry[] |
getLookupAttributes()
Get the current attribute sets for the service. |
String[] |
getLookupGroups()
Get the list of groups to join. |
LookupLocator[] |
getLookupLocators()
Get the list of locators of specific lookup services to join. |
String[] |
getMemberGroups()
Returns an array consisting of the names of the groups in which the lookup service is a member. |
com.gigaspaces.lrmi.nio.info.NIODetails |
getNIODetails()
|
com.gigaspaces.lrmi.nio.info.NIOStatistics |
getNIOStatistics()
|
com.gigaspaces.internal.os.OSDetails |
getOSDetails()
|
com.gigaspaces.internal.os.OSStatistics |
getOSStatistics()
|
Object |
getProxy()
Returns a proxy object for this remote object. |
TrustVerifier |
getProxyVerifier()
Returns a TrustVerifier that can be used to verify that
a proxy can be trusted as a proxy for the service; that is, the
isTrustedObject method of the
returned verifier can be called with a candidate proxy. |
Object |
getServiceProxy()
Returns a proxy object for this object. |
ServiceTypeBase[] |
getServiceTypes(Template tmpl,
String prefix)
Looks at all service items that match the specified template, and for every service item finds the most specific type (class or interface) or types the service item is an instance of that are neither equal to, nor a superclass of, any of the service types in the template and that have names that start with the specified prefix, and returns the set of all such types. |
int |
getUnicastPort()
Returns the port number on which the lookup service listens for unicast discovery queries. |
String[] |
getZones()
|
LogEntries |
logEntriesDirect(LogEntryMatcher matcher)
|
MarshalledWrapper |
lookup(Template tmpl)
Returns the service object (i.e., just ServiceItem.service) from an item matching the template, or null if there is no match. |
Matches |
lookup(Template tmpl,
int maxMatches)
Returns at most maxMatches items matching the template, plus the total number of items that match the template. |
void |
modifyAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSetTmpls,
EntryRep[] attrSets)
Modifies existing attribute sets of a registered service item. |
void |
modifyLookupAttributes(Entry[] attrSetTemplates,
Entry[] attrSets)
Modify the current attribute sets, using the same semantics as ServiceRegistration.modifyAttributes. |
RegistrarEventRegistration |
notify(Template tmpl,
int transitions,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration)
Registers for event notification. |
RegistrarEventRegistration |
notify(Template tmpl,
int transitions,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration,
int notifyType)
Registers for event notification. |
ServiceRegistration |
register(Item nitem,
long leaseDuration)
Register a new service or re-register an existing service. |
void |
removeLookupGroups(String[] groups)
Remove groups from the set to join. |
void |
removeLookupLocators(LookupLocator[] locators)
Remove locators for specific lookup services from the set to join. |
void |
removeMemberGroups(String[] groups)
Deletes the elements of the given set of names from the set whose elements are the names of the groups in which the lookup service is currently a member. |
long |
renewEventLease(long eventID,
Uuid leaseID,
long renewDuration)
Renews an event lease. |
RenewResults |
renewLeases(Object[] regIDs,
Uuid[] leaseIDs,
long[] renewDurations)
Renews service and event leases from a LeaseMap. |
long |
renewServiceLease(ServiceID serviceID,
Uuid leaseID,
long renewDuration)
Renews a service lease. |
void |
runGc()
|
ServiceDetails |
serviceDetails(ServiceID serviceID)
Returns the service details of the service id. |
void |
setAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSets)
Deletes all of the service item's existing attributes, and replaces them with the specified attribute sets. |
void |
setLookupGroups(String[] groups)
Replace the list of groups to join with a new list. |
void |
setLookupLocators(LookupLocator[] locators)
Replace the list of locators of specific lookup services to join with a new list. |
void |
setMemberGroups(String[] groups)
Replaces the set whose elements are the names of the groups in which the lookup service is currently a member with the given set of group names. |
void |
setUnicastPort(int port)
Changes the number of the port on which the lookup service is currently listening for unicast discovery queries to the given port number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GigaRegistrar(String[] configArgs,
LifeCycle lifeCycle)
throws Exception
Exception| Method Detail |
|---|
public Object getServiceProxy()
throws NoSuchObjectException
ServiceProxyAccessornull.
getServiceProxy in interface ServiceProxyAccessorNoSuchObjectExceptionpublic Object getProxy()
ProxyAccessornull is returned.
getProxy in interface ProxyAccessornull
public TrustVerifier getProxyVerifier()
throws NoSuchObjectException
ServerProxyTrustTrustVerifier that can be used to verify that
a proxy can be trusted as a proxy for the service; that is, the
isTrustedObject method of the
returned verifier can be called with a candidate proxy. The verifier
should be able to verify all proxies for the service, including
proxies for resources (such as leases and registrations).
getProxyVerifier in interface ServerProxyTrustTrustVerifier that can be used to verify that
a proxy can be trusted as a proxy for the service
NoSuchObjectException
public ServiceRegistration register(Item nitem,
long leaseDuration)
throws NoSuchObjectException
Registrar
register in interface RegistrarNoSuchObjectExceptionServiceRegistrar.register(net.jini.core.lookup.ServiceItem, long)
public ServiceDetails serviceDetails(ServiceID serviceID)
throws RemoteException
Registrar
serviceDetails in interface RegistrarRemoteException
public MarshalledWrapper lookup(Template tmpl)
throws NoSuchObjectException
Registrar
lookup in interface RegistrarNoSuchObjectExceptionServiceRegistrar.lookup(net.jini.core.lookup.ServiceTemplate)
public Matches lookup(Template tmpl,
int maxMatches)
throws NoSuchObjectException
Registrar
lookup in interface RegistrarNoSuchObjectExceptionServiceRegistrar.lookup(net.jini.core.lookup.ServiceTemplate)
public RegistrarEventRegistration notify(Template tmpl,
int transitions,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration)
throws RemoteException
Registrar
notify in interface RegistrarRemoteExceptionServiceRegistrar.notify(net.jini.core.lookup.ServiceTemplate, int, net.jini.core.event.RemoteEventListener, java.rmi.MarshalledObject, long)
public RegistrarEventRegistration notify(Template tmpl,
int transitions,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration,
int notifyType)
throws RemoteException
Registrar
notify in interface RegistrarRemoteExceptionServiceRegistrar.notify(net.jini.core.lookup.ServiceTemplate, int, net.jini.core.event.RemoteEventListener, java.rmi.MarshalledObject, long)
public EntryClassBase[] getEntryClasses(Template tmpl)
throws NoSuchObjectException
Registrar
getEntryClasses in interface RegistrarNoSuchObjectExceptionServiceRegistrar.getEntryClasses(net.jini.core.lookup.ServiceTemplate)
public Object[] getFieldValues(Template tmpl,
int setIndex,
int field)
throws NoSuchObjectException
Registrar
getFieldValues in interface RegistrarNoSuchObjectExceptionServiceRegistrar.getFieldValues(net.jini.core.lookup.ServiceTemplate, int, java.lang.String)
public ServiceTypeBase[] getServiceTypes(Template tmpl,
String prefix)
throws NoSuchObjectException
Registrar
getServiceTypes in interface RegistrarNoSuchObjectExceptionServiceRegistrar.getServiceTypes(net.jini.core.lookup.ServiceTemplate, java.lang.String)
public LookupLocator getLocator()
throws NoSuchObjectException
Registrar
getLocator in interface RegistrarNoSuchObjectExceptionServiceRegistrar.getLocator()
public Object getAdmin()
throws NoSuchObjectException
Administrable
getAdmin in interface AdministrableNoSuchObjectExceptionJoinAdmin
public void addAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSets)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
addAttributes in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionServiceRegistration.addAttributes(net.jini.core.entry.Entry[])
public void modifyAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSetTmpls,
EntryRep[] attrSets)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
modifyAttributes in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionServiceRegistration.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])
public void setAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSets)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
setAttributes in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionServiceRegistration.setAttributes(net.jini.core.entry.Entry[])
public void cancelServiceLease(ServiceID serviceID,
Uuid leaseID)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
cancelServiceLease in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionLease.cancel()
public long renewServiceLease(ServiceID serviceID,
Uuid leaseID,
long renewDuration)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
renewServiceLease in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionLease.renew(long)
public void cancelEventLease(long eventID,
Uuid leaseID)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
cancelEventLease in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionLease.cancel()
public long renewEventLease(long eventID,
Uuid leaseID,
long renewDuration)
throws NoSuchObjectException,
UnknownLeaseException
Registrar
renewEventLease in interface RegistrarNoSuchObjectException
UnknownLeaseExceptionLease.renew(long)
public RenewResults renewLeases(Object[] regIDs,
Uuid[] leaseIDs,
long[] renewDurations)
throws NoSuchObjectException
Registrar
renewLeases in interface RegistrarNoSuchObjectExceptionLeaseMap.renewAll()
public Exception[] cancelLeases(Object[] regIDs,
Uuid[] leaseIDs)
throws NoSuchObjectException
Registrar
cancelLeases in interface RegistrarNoSuchObjectExceptionLeaseMap.cancelAll()
public Entry[] getLookupAttributes()
throws NoSuchObjectException
JoinAdmin
getLookupAttributes in interface JoinAdminNoSuchObjectException
public void addLookupAttributes(Entry[] attrSets)
throws RemoteException
JoinAdmin
addLookupAttributes in interface JoinAdminattrSets - the attribute sets to add
RemoteException
public void modifyLookupAttributes(Entry[] attrSetTemplates,
Entry[] attrSets)
throws RemoteException
JoinAdmin
modifyLookupAttributes in interface JoinAdminattrSetTemplates - the templates for matching attribute setsattrSets - the modifications to make to matching sets
RemoteExceptionServiceRegistration.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])
public String[] getLookupGroups()
throws NoSuchObjectException
JoinAdmin
getLookupGroups in interface JoinAdminNoSuchObjectExceptionJoinAdmin.setLookupGroups(java.lang.String[])
public void addLookupGroups(String[] groups)
throws NoSuchObjectException
JoinAdmin
addLookupGroups in interface JoinAdmingroups - groups to join
NoSuchObjectExceptionJoinAdmin.removeLookupGroups(java.lang.String[])
public void removeLookupGroups(String[] groups)
throws NoSuchObjectException
JoinAdmin
removeLookupGroups in interface JoinAdmingroups - groups to leave
NoSuchObjectExceptionJoinAdmin.addLookupGroups(java.lang.String[])
public void setLookupGroups(String[] groups)
throws NoSuchObjectException
JoinAdmin
setLookupGroups in interface JoinAdmingroups - groups to join
NoSuchObjectExceptionJoinAdmin.getLookupGroups()
public LookupLocator[] getLookupLocators()
throws NoSuchObjectException
JoinAdmin
getLookupLocators in interface JoinAdminNoSuchObjectExceptionJoinAdmin.setLookupLocators(net.jini.core.discovery.LookupLocator[])
public void addLookupLocators(LookupLocator[] locators)
throws RemoteException
JoinAdmin
addLookupLocators in interface JoinAdminlocators - locators of specific lookup services to join
RemoteExceptionJoinAdmin.removeLookupLocators(net.jini.core.discovery.LookupLocator[])
public void removeLookupLocators(LookupLocator[] locators)
throws RemoteException
JoinAdmin
removeLookupLocators in interface JoinAdminlocators - locators of specific lookup services to leave
RemoteExceptionJoinAdmin.addLookupLocators(net.jini.core.discovery.LookupLocator[])
public void setLookupLocators(LookupLocator[] locators)
throws RemoteException
JoinAdmin
setLookupLocators in interface JoinAdminlocators - locators of specific lookup services to join
RemoteExceptionJoinAdmin.getLookupLocators()
public void addMemberGroups(String[] groups)
throws NoSuchObjectException
DiscoveryAdminNO_GROUPS) is input, this method takes no action.
addMemberGroups in interface DiscoveryAdmingroups - String array consisting of the names of
the new, additional groups in which the lookup service
is to be a member.
NoSuchObjectException
public void removeMemberGroups(String[] groups)
throws NoSuchObjectException
DiscoveryAdminNO_GROUPS) is input, this
method takes no action.
removeMemberGroups in interface DiscoveryAdmingroups - String array consisting of the names to
remove from the set whose elements are the names of the
groups in which the lookup service is currently a member.
NoSuchObjectException
public String[] getMemberGroups()
throws NoSuchObjectException
DiscoveryAdmin
getMemberGroups in interface DiscoveryAdminString array consisting of the names of the groups
in which the lookup service is a member
NoSuchObjectException
public void setMemberGroups(String[] groups)
throws NoSuchObjectException
DiscoveryAdminNO_GROUPS)
is input, then the lookup service will be a member of no groups.
setMemberGroups in interface DiscoveryAdmingroups - String array consisting of the names of
the new groups in which the lookup service is to be a
member.
NoSuchObjectException
public int getUnicastPort()
throws NoSuchObjectException
DiscoveryAdmin
getUnicastPort in interface DiscoveryAdminint representing the port number on which the
lookup service listens for unicast discovery queries.
NoSuchObjectException
public void setUnicastPort(int port)
throws IOException
DiscoveryAdmin
setUnicastPort in interface DiscoveryAdminport - int representing the new port number on which
the lookup service should listen for unicast discovery
queries.
IOException - because an invocation of this method will
result in the re-initiation of the unicast discovery process,
which can throw an IOException when socket
allocation occurs.
RemoteException - typically, this exception occurs when
there is a communication failure between the client and the
server.
public void destroy()
throws RemoteException
DestroyAdmin
destroy in interface DestroyAdminRemoteException
public int getAgentId()
throws RemoteException
getAgentId in interface com.gigaspaces.grid.gsa.AgentIdAwareRemoteException
public String getGSAServiceID()
throws RemoteException
getGSAServiceID in interface com.gigaspaces.grid.gsa.AgentIdAwareRemoteException
public com.gigaspaces.lrmi.nio.info.NIODetails getNIODetails()
throws RemoteException
getNIODetails in interface com.gigaspaces.lrmi.nio.info.NIOInfoProviderRemoteException
public com.gigaspaces.lrmi.nio.info.NIOStatistics getNIOStatistics()
throws RemoteException
getNIOStatistics in interface com.gigaspaces.lrmi.nio.info.NIOInfoProviderRemoteException
public void enableLRMIMonitoring()
throws RemoteException
enableLRMIMonitoring in interface com.gigaspaces.lrmi.nio.info.NIOInfoProviderRemoteException
public void disableLRMIMonitoring()
throws RemoteException
disableLRMIMonitoring in interface com.gigaspaces.lrmi.nio.info.NIOInfoProviderRemoteException
public com.gigaspaces.lrmi.LRMIMonitoringDetails fetchLRMIMonitoringDetails()
throws RemoteException
fetchLRMIMonitoringDetails in interface com.gigaspaces.lrmi.nio.info.NIOInfoProviderRemoteException
public long getCurrentTimestamp()
throws RemoteException
getCurrentTimestamp in interface com.gigaspaces.internal.os.OSInfoProviderRemoteException
public com.gigaspaces.internal.os.OSDetails getOSDetails()
throws RemoteException
getOSDetails in interface com.gigaspaces.internal.os.OSInfoProviderRemoteException
public com.gigaspaces.internal.os.OSStatistics getOSStatistics()
throws RemoteException
getOSStatistics in interface com.gigaspaces.internal.os.OSInfoProviderRemoteException
public com.gigaspaces.internal.jvm.JVMDetails getJVMDetails()
throws RemoteException
getJVMDetails in interface com.gigaspaces.internal.jvm.JVMInfoProviderRemoteException
public com.gigaspaces.internal.jvm.JVMStatistics getJVMStatistics()
throws RemoteException
getJVMStatistics in interface com.gigaspaces.internal.jvm.JVMInfoProviderRemoteException
public void runGc()
throws RemoteException
runGc in interface com.gigaspaces.internal.jvm.JVMInfoProviderRemoteException
public String[] getZones()
throws RemoteException
getZones in interface com.gigaspaces.grid.zone.GridZoneProviderRemoteException
public LogEntries logEntriesDirect(LogEntryMatcher matcher)
throws RemoteException,
IOException
logEntriesDirect in interface com.gigaspaces.internal.log.InternalLogProviderRemoteException
IOException
public com.gigaspaces.internal.dump.InternalDumpResult generateDump(String cause,
Map<String,Object> context)
throws RemoteException,
com.gigaspaces.internal.dump.InternalDumpException
generateDump in interface com.gigaspaces.internal.dump.InternalDumpProviderRemoteException
com.gigaspaces.internal.dump.InternalDumpException
public com.gigaspaces.internal.dump.InternalDumpResult generateDump(String cause,
Map<String,Object> context,
String... contributors)
throws RemoteException,
com.gigaspaces.internal.dump.InternalDumpException
generateDump in interface com.gigaspaces.internal.dump.InternalDumpProviderRemoteException
com.gigaspaces.internal.dump.InternalDumpException
public byte[] dumpBytes(String file,
long from,
int length)
throws RemoteException,
IOException
dumpBytes in interface com.gigaspaces.internal.dump.InternalDumpProviderRemoteException
IOException
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||