Tabnine Logo
FLUSH.currentViewId
Code IndexAdd Tabnine to your IDE (free)

How to use
currentViewId
method
in
org.jgroups.protocols.pbcast.FLUSH

Best Java code snippets using org.jgroups.protocols.pbcast.FLUSH.currentViewId (Showing top 18 results out of 315)

origin: wildfly/wildfly

private boolean isCurrentFlushMessage(FlushHeader fh) {
  return fh.viewID == currentViewId();
}
origin: wildfly/wildfly

rejectFlush(flushParticipants, currentViewId());
throw new RuntimeException(localAddress
      + " timed out waiting for flush responses from "
origin: wildfly/wildfly

/**
 * Starts the flush protocol
 * @param members List of participants in the flush protocol. Guaranteed to be non-null
 */
private void onSuspend(final List<Address> members) {
  Message msg = null;
  Collection<Address> participantsInFlush = null;
 synchronized (sharedLock) {
   flushCoordinator = localAddress;         
   // start FLUSH only on group members that we need to flush
   participantsInFlush = members;
   participantsInFlush.retainAll(currentView.getMembers());
   flushMembers.clear();
   flushMembers.addAll(participantsInFlush);
   flushMembers.removeAll(suspected);
      msg = new Message(null).src(localAddress).setBuffer(marshal(participantsInFlush, null))
    .putHeader(this.id, new FlushHeader(FlushHeader.START_FLUSH, currentViewId()));
 }
  if (participantsInFlush.isEmpty()) {
    flush_promise.setResult(SUCCESS_START_FLUSH);
  } else {
    down_prot.down(msg);
    if (log.isDebugEnabled())
      log.debug(localAddress + ": flush coordinator "
          + " is starting FLUSH with participants " + participantsInFlush);
  }
}
origin: wildfly/wildfly

suspected.addAll(addresses);
flushMembers.removeAll(suspected);
viewID = currentViewId();
flushOkCompleted = !flushCompletedMap.isEmpty() && flushCompletedMap.keySet().containsAll(flushMembers);
if (flushOkCompleted) {
origin: wildfly/wildfly

msg = new Message().setFlag(Message.Flag.OOB);
reconcileOks.clear();
msg.putHeader(this.id, new FlushHeader(FlushHeader.FLUSH_RECONCILE, currentViewId()))
 .setBuffer(marshal(flushMembers, d));
origin: wildfly/wildfly

@SuppressWarnings("unchecked")
private void onResume(Event evt) {
  List<Address> members =evt.getArg();
  long viewID = currentViewId();
  boolean isParticipant = false;
  synchronized(sharedLock) {
    isParticipant = flushMembers.contains(localAddress) || (members != null && members.contains(localAddress));
  }
  if (members == null || members.isEmpty()) {
    Message msg = new Message(null).src(localAddress);
    // Cannot be OOB since START_FLUSH is not OOB
    // we have to FIFO order two subsequent flushes
    if (log.isDebugEnabled())
      log.debug(localAddress + ": received RESUME, sending STOP_FLUSH to all");
    msg.putHeader(this.id, new FlushHeader(FlushHeader.STOP_FLUSH, viewID));
    down_prot.down(msg);
  } else {
    for (Address address : members) {
      Message msg = new Message(address).src(localAddress);
      // Cannot be OOB since START_FLUSH is not OOB
      // we have to FIFO order two subsequent flushes
      if (log.isDebugEnabled())
        log.debug(localAddress + ": received RESUME, sending STOP_FLUSH to " + address);
      msg.putHeader(this.id, new FlushHeader(FlushHeader.STOP_FLUSH, viewID));
      down_prot.down(msg);
    }
  }
  if(isParticipant)
    waitForUnblock();        
}
origin: org.jgroups/com.springsource.org.jgroups

private boolean isCurrentFlushMessage(FlushHeader fh) {
  return fh.viewID == currentViewId();
}
origin: org.jboss.eap/wildfly-client-all

private boolean isCurrentFlushMessage(FlushHeader fh) {
  return fh.viewID == currentViewId();
}
origin: org.jgroups/com.springsource.org.jgroups

private void onResume() {
  long viewID = currentViewId();
  Message msg = new Message(null, localAddress, null);
  msg.putHeader(getName(), new FlushHeader(FlushHeader.STOP_FLUSH, viewID));
  down_prot.down(new Event(Event.MSG, msg));
  if (log.isDebugEnabled())
    log.debug("Received RESUME at " + localAddress
        + ", sent STOP_FLUSH to all");
}
origin: org.jboss.eap/wildfly-client-all

rejectFlush(flushParticipants, currentViewId());
throw new RuntimeException(localAddress
      + " timed out waiting for flush responses from "
origin: org.jgroups/com.springsource.org.jgroups

msg = new Message();
msg.setFlag(Message.OOB);                
FlushHeader fh = new FlushHeader(FlushHeader.FLUSH_RECONCILE, currentViewId(), flushMembers);
reconcileOks.clear();
fh.addDigest(d);
origin: org.jgroups/com.springsource.org.jgroups

private void onSuspect(Address address) {
  boolean flushOkCompleted = false;
  Message m = null;
  long viewID = 0;
  synchronized (sharedLock) {
    suspected.add(address);
    flushMembers.removeAll(suspected);
    viewID = currentViewId();
    flushOkCompleted = !flushOkSet.isEmpty() && flushOkSet.containsAll(flushMembers);
    if (flushOkCompleted) {
      m = new Message(flushCoordinator, localAddress, null);
    }
    if (log.isDebugEnabled())
      log.debug("Suspect is " + address + ",completed "
          + flushOkCompleted + ",  flushOkSet " + flushOkSet
          + " flushMembers " + flushMembers);
  }
  if (flushOkCompleted) {
    Digest digest = (Digest) down_prot.down(new Event(Event.GET_DIGEST));
    FlushHeader fh = new FlushHeader(FlushHeader.FLUSH_COMPLETED,viewID);
    fh.addDigest(digest);
    m.putHeader(getName(), fh);
    down_prot.down(new Event(Event.MSG, m));
    if (log.isDebugEnabled())
      log.debug(localAddress + " sent FLUSH_COMPLETED message to "
          + flushCoordinator);
  }        
}
origin: org.jgroups/com.springsource.org.jgroups

private void onSuspend(View view) {
  Message msg = null;
  Collection<Address> participantsInFlush = null;
  synchronized (sharedLock) {
    // start FLUSH only on group members that we need to flush
    if (view != null) {
      participantsInFlush = new ArrayList<Address>(view.getMembers());
      participantsInFlush.retainAll(currentView.getMembers());
    } else {
      participantsInFlush = new ArrayList<Address>(currentView.getMembers());
    }
    msg = new Message(null, localAddress, null);
    msg.putHeader(getName(), new FlushHeader(FlushHeader.START_FLUSH,
        currentViewId(), participantsInFlush));
  }
  if (participantsInFlush.isEmpty()) {
    flush_promise.setResult(Boolean.TRUE);
  } else {
    down_prot.down(new Event(Event.MSG, msg));
    if (log.isDebugEnabled())
      log.debug("Flush coordinator " + localAddress
          + " is starting FLUSH with participants " + participantsInFlush);
  }
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Starts the flush protocol
 * @param members List of participants in the flush protocol. Guaranteed to be non-null
 */
private void onSuspend(final List<Address> members) {
  Message msg = null;
  Collection<Address> participantsInFlush = null;
 synchronized (sharedLock) {
   flushCoordinator = localAddress;         
   // start FLUSH only on group members that we need to flush
   participantsInFlush = members;
   participantsInFlush.retainAll(currentView.getMembers());
   flushMembers.clear();
   flushMembers.addAll(participantsInFlush);
   flushMembers.removeAll(suspected);
      msg = new Message(null).src(localAddress).setBuffer(marshal(participantsInFlush, null))
    .putHeader(this.id, new FlushHeader(FlushHeader.START_FLUSH, currentViewId()));
 }
  if (participantsInFlush.isEmpty()) {
    flush_promise.setResult(SUCCESS_START_FLUSH);
  } else {
    down_prot.down(msg);
    if (log.isDebugEnabled())
      log.debug(localAddress + ": flush coordinator "
          + " is starting FLUSH with participants " + participantsInFlush);
  }
}
origin: org.jgroups/com.springsource.org.jgroups

msg.putHeader(getName(), new FlushHeader(FlushHeader.STOP_FLUSH_OK,currentViewId()));		
down_prot.down(new Event(Event.MSG, msg));			
if (log.isDebugEnabled())
origin: org.jboss.eap/wildfly-client-all

suspected.addAll(addresses);
flushMembers.removeAll(suspected);
viewID = currentViewId();
flushOkCompleted = !flushCompletedMap.isEmpty() && flushCompletedMap.keySet().containsAll(flushMembers);
if (flushOkCompleted) {
origin: org.jboss.eap/wildfly-client-all

msg = new Message().setFlag(Message.Flag.OOB);
reconcileOks.clear();
msg.putHeader(this.id, new FlushHeader(FlushHeader.FLUSH_RECONCILE, currentViewId()))
 .setBuffer(marshal(flushMembers, d));
origin: org.jboss.eap/wildfly-client-all

@SuppressWarnings("unchecked")
private void onResume(Event evt) {
  List<Address> members =evt.getArg();
  long viewID = currentViewId();
  boolean isParticipant = false;
  synchronized(sharedLock) {
    isParticipant = flushMembers.contains(localAddress) || (members != null && members.contains(localAddress));
  }
  if (members == null || members.isEmpty()) {
    Message msg = new Message(null).src(localAddress);
    // Cannot be OOB since START_FLUSH is not OOB
    // we have to FIFO order two subsequent flushes
    if (log.isDebugEnabled())
      log.debug(localAddress + ": received RESUME, sending STOP_FLUSH to all");
    msg.putHeader(this.id, new FlushHeader(FlushHeader.STOP_FLUSH, viewID));
    down_prot.down(msg);
  } else {
    for (Address address : members) {
      Message msg = new Message(address).src(localAddress);
      // Cannot be OOB since START_FLUSH is not OOB
      // we have to FIFO order two subsequent flushes
      if (log.isDebugEnabled())
        log.debug(localAddress + ": received RESUME, sending STOP_FLUSH to " + address);
      msg.putHeader(this.id, new FlushHeader(FlushHeader.STOP_FLUSH, viewID));
      down_prot.down(msg);
    }
  }
  if(isParticipant)
    waitForUnblock();        
}
org.jgroups.protocols.pbcastFLUSHcurrentViewId

Popular methods of FLUSH

  • blockMessageDuringFlush
  • down
  • findHighestSequences
  • handleFlushReconcile
  • handleStartFlush
  • hasVirtualSynchronyGaps
  • isCurrentFlushMessage
  • onFlushCompleted
  • onFlushReconcileOK
  • onResume
  • onStartFlush
  • onStopFlush
  • onStartFlush,
  • onStopFlush,
  • onSuspect,
  • onSuspend,
  • onViewChange,
  • rejectFlush,
  • sendBlockUpToChannel,
  • startFlush,
  • handleConnect

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JList (javax.swing)
  • JTable (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now