Codota Logo
FLUSH.currentViewId
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
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
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now