Exemplo n.º 1
0
  /**
   * Constructor.
   *
   * @param group Barrier group.
   * @param identityGenerator Identity generator.
   * @throws CommunicationException If the barrier group could not be created due to a network
   *     communication problem.
   */
  public BarrierImplementation(BarrierGroup group, BarrierIdentityGenerator identityGenerator)
      throws CommunicationException {

    m_barrierGroup = group;
    m_identityGenerator = identityGenerator;
    m_identity = identityGenerator.next();

    m_barrierGroup.addListener(this);

    m_barrierGroup.addBarrier();
  }
Exemplo n.º 2
0
 /** {@inheritDoc} */
 public String getName() {
   return m_barrierGroup.getName();
 }