org.exoplatform.services.jcr.ext.replication.priority
Class DynamicPriorityChecker

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.replication.priority.AbstractPriorityChecker
      extended by org.exoplatform.services.jcr.ext.replication.priority.DynamicPriorityChecker
All Implemented Interfaces:
PacketListener

public class DynamicPriorityChecker
extends AbstractPriorityChecker

Created by The eXo Platform SAS.

Version:
$Id: DynamicPriorityChecker.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Alex Reshetnyak

Field Summary
 
Fields inherited from class org.exoplatform.services.jcr.ext.replication.priority.AbstractPriorityChecker
channelManager, currentParticipants, identifier, MAX_PRIORITY, memberListener, otherParticipants, ownName, ownPriority
 
Constructor Summary
DynamicPriorityChecker(ChannelManager channelManager, int ownPriority, java.lang.String ownName, java.util.List<java.lang.String> otherParticipants)
          DynamicPriorityChecker constructor.
 
Method Summary
 void informAll()
          informAll.
 boolean isMaxPriority()
          isMaxPriority.
 void receive(Packet packet)
          receive. Will be called this method when receive the Packet.
 
Methods inherited from class org.exoplatform.services.jcr.ext.replication.priority.AbstractPriorityChecker
isAllOnline, isMaxOnline, printOnlineMembers, setMemberListener, waitView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicPriorityChecker

public DynamicPriorityChecker(ChannelManager channelManager,
                              int ownPriority,
                              java.lang.String ownName,
                              java.util.List<java.lang.String> otherParticipants)
DynamicPriorityChecker constructor.

Parameters:
channelManager - the ChannelManager
ownPriority - the own priority
ownName - the own name
otherParticipants - the list of names to other participants
Method Detail

receive

public void receive(Packet packet)
receive. Will be called this method when receive the Packet.

Specified by:
receive in interface PacketListener
Specified by:
receive in class AbstractPriorityChecker
Parameters:
packet - the Packet object.

informAll

public void informAll()
informAll. If was changed members in cluster, then will be called this method.

Overrides:
informAll in class AbstractPriorityChecker

isMaxPriority

public boolean isMaxPriority()
isMaxPriority.

Specified by:
isMaxPriority in class AbstractPriorityChecker
Returns:
boolean if current time this is max priority then return 'true'


Copyright © 2012 eXo Platform SAS. All Rights Reserved.