|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.protocol.utobcast.ProcessMembershipImpl
Implementation of the ProcessMembership
interface.
Field Summary |
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.protocol.utobcast.ProcessMembership |
ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
ProcessMembershipImpl()
Constructor. |
Method Summary | |
void |
addProcess(Process process)
Adds a process to the group of processes. |
void |
bindFc(String clientItfName,
Object serverItf)
|
Process |
electBackup()
Elects a new backup process. |
Process |
electBackupAsLeader(Process oldLeader)
Elects the backup as new leader provided the curerntly registered leader is the one given in parameter. |
Process |
getBackup()
Returns the backup process. |
boolean |
getBlocking()
Returns true if the ProcessMembership component is in
blocking mode. |
Process |
getLeader()
Returns the leader process. |
Process |
getMyself()
Returns the process to which this process membership component belongs. |
Process[] |
getOtherProcesses()
Returns an array containing all the processes except backup and leader processes. |
String[] |
listFc()
|
void |
removeProcess(Process process)
Removes a process from the group of processes. |
void |
setBackup(Process backup)
Sets the backup process. |
void |
setBlocking(boolean blocking)
Sets the blocking attribute. |
void |
setLeader(Process leader)
Sets the leader process. |
void |
setMyself(Process myself)
Sets the process to which this process membership component belongs. |
void |
setOtherProcesses(Process[] processes)
Sets the processes to be considered for broadcast (except backup and leader). |
void |
unbindFc(String clientItfName)
|
Methods inherited from class org.objectweb.dream.AbstractComponent |
beforeFirstStart, getFcState, initComponent, lookupFc, setLogger, startFc, stopFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProcessMembershipImpl()
Method Detail |
public Process getLeader() throws InterruptedException
ProcessMembership
getLeader
in interface ProcessMembership
InterruptedException
ProcessMembership.getLeader()
public void setLeader(Process leader)
ProcessMembership
setLeader
in interface ProcessMembership
leader
- the leader to set.ProcessMembership.setLeader(Process)
public Process getBackup() throws InterruptedException
ProcessMembership
getBackup
in interface ProcessMembership
InterruptedException
- if the component is interrupted while waiting
for a backup to be elected.ProcessMembership.getBackup()
public void setBackup(Process backup)
ProcessMembership
setBackup
in interface ProcessMembership
backup
- the backup to set.ProcessMembership.setBackup(Process)
public Process getMyself() throws InterruptedException
ProcessMembership
getMyself
in interface ProcessMembership
InterruptedException
ProcessMembership.getMyself()
public void setMyself(Process myself)
ProcessMembership
setMyself
in interface ProcessMembership
myself
- the process to set.ProcessMembership.setMyself(Process)
public void setOtherProcesses(Process[] processes)
ProcessMembership
setOtherProcesses
in interface ProcessMembership
processes
- all the processes except backup and leader processes.ProcessMembership.setOtherProcesses(org.objectweb.dream.protocol.Process[])
public Process[] getOtherProcesses()
ProcessMembership
getOtherProcesses
in interface ProcessMembership
ProcessMembership.getOtherProcesses()
public void addProcess(Process process)
ProcessMembership
addProcess
in interface ProcessMembership
process
- the process to be added.ProcessMembership.addProcess(Process)
public void removeProcess(Process process)
ProcessMembership
removeProcess
in interface ProcessMembership
process
- the process to be removed.ProcessMembership.removeProcess(org.objectweb.dream.protocol.Process)
public Process electBackup() throws InterruptedException
ProcessMembership
null
if no process is
available for being elected.
electBackup
in interface ProcessMembership
null
if no process is available.
InterruptedException
- if the component is interrupted while waiting
for a process to be added in the group.ProcessMembership.electBackup()
public Process electBackupAsLeader(Process oldLeader)
ProcessMembership
electBackupAsLeader
in interface ProcessMembership
oldLeader
- the process that were supposed to be the old leader.
ProcessMembership.electBackupAsLeader(org.objectweb.dream.protocol.Process)
public void setBlocking(boolean blocking)
ProcessMembershipAttributeController
ProcessMembership.getLeader()
method would block is no leader is
currently elected.
setBlocking
in interface ProcessMembershipAttributeController
blocking
- the value to set.ProcessMembershipAttributeController.setBlocking(boolean)
public boolean getBlocking()
ProcessMembershipAttributeController
true
if the ProcessMembership component is in
blocking mode.
getBlocking
in interface ProcessMembershipAttributeController
true
if the ProcessMembership component is in
blocking mode.ProcessMembershipAttributeController.getBlocking()
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(java.lang.String,
java.lang.Object)
public void unbindFc(String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
unbindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.unbindFc(java.lang.String)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |