Rio Project 4.2 API Documentation



org.rioproject.monitor
Interface ProvisionMonitor

All Superinterfaces:
Administrable, EventProducer, MonitorableService, ProvisionManager, Remote, Service, Watchable
All Known Implementing Classes:
ProvisionMonitorImpl

public interface ProvisionMonitor
extends ProvisionManager, Service

The ProvisionMonitor extends the ProvisionManager and Service interfaces, and defines the semantics required for ProvisionMonitor instances to back-up each other

Author:
Dennis Reedy

Nested Class Summary
static class ProvisionMonitor.PeerInfo
          Contains information about ProvisionMonitor peers involved in providing support for backup approach
 
Method Summary
 boolean assignBackupFor(ProvisionMonitor monitor)
          Assign the ProvisionMonitor as a backup for another ProvisionMonitor
 ProvisionMonitor.PeerInfo getPeerInfo()
          Get the PeerInfo object for the ProvisionMonitor
 boolean removeBackupFor(ProvisionMonitor monitor)
          Remove the ProvisionMonitor as a backup for another ProvisionMonitor
 void update(ProvisionMonitor.PeerInfo info)
          Notification from ProvisionMonitor peers updates to the PeerInfo object.
 
Methods inherited from interface org.rioproject.core.provision.ProvisionManager
getServiceBeanInstantiators, register, update
 
Methods inherited from interface net.jini.admin.Administrable
getAdmin
 
Methods inherited from interface org.rioproject.jsb.MonitorableService
monitor, ping, startHeartbeat
 
Methods inherited from interface org.rioproject.event.EventProducer
register
 
Methods inherited from interface org.rioproject.watch.Watchable
fetch, fetch
 

Method Detail

assignBackupFor

boolean assignBackupFor(ProvisionMonitor monitor)
                        throws RemoteException
Assign the ProvisionMonitor as a backup for another ProvisionMonitor

Parameters:
monitor - The ProvisionMonitor that will be backed up. If this ProvisionMonitor is removed from the network, then all OperationalString instances the removed ProvisionManager was managing will be managed by this ProvisionMonitor
Returns:
Return true if the ProvisionMonitor accepts the backup role, false if it refuses.
Throws:
RemoteException - if communication errors occur

removeBackupFor

boolean removeBackupFor(ProvisionMonitor monitor)
                        throws RemoteException
Remove the ProvisionMonitor as a backup for another ProvisionMonitor

Parameters:
monitor - The primary ProvisionMonitor that no longer requires the support of this ProvisionManager
Returns:
Return true if the ProvisionMonitor has removed itself as a backup
Throws:
RemoteException - if communication errors occur

update

void update(ProvisionMonitor.PeerInfo info)
            throws RemoteException
Notification from ProvisionMonitor peers updates to the PeerInfo object. This notification is sent as ProvisionMonitor instances are selected by other ProvisionMonitor instances for backup duty.

Parameters:
info - The PeerInfo object
Throws:
RemoteException - if communication errors occur

getPeerInfo

ProvisionMonitor.PeerInfo getPeerInfo()
                                      throws RemoteException
Get the PeerInfo object for the ProvisionMonitor

Returns:
The PeerInfo object for the ProvisionMonitor
Throws:
RemoteException - if communication errors occur

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.