Codota Logo
GossipData.getType
Code IndexAdd Codota to your IDE (free)

How to use
getType
method
in
org.jgroups.stack.GossipData

Best Java code snippets using org.jgroups.stack.GossipData.getType (Showing top 7 results out of 315)

  • Common ways to obtain GossipData
private void myMethod () {
GossipData g =
  • Codota Iconnew GossipData()
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

@Override
public void receive(GossipData data) {
  switch (data.getType()) {
    case MESSAGE:
      if(Objects.equals(local_addr, data.getSender()))
        return;
      byte[] msg=data.getBuffer();
      receive(data.getSender(), msg, 0, msg.length);
      break;
    case SUSPECT:
      Address suspect=data.getAddress();
      if(suspect != null) {
        log.debug("%s: firing suspect event for %s", local_addr, suspect);
        up(new Event(Event.SUSPECT, Collections.singletonList(suspect)));
      }
      break;
  }
}
origin: wildfly/wildfly

public void receive(Address sender, DataInput in) throws Exception {
  GossipData data=new GossipData();
  data.readFrom(in);
  switch(data.getType()) {
    case MESSAGE:
    case SUSPECT:
      if(receiver != null)
        receiver.receive(data);
      break;
    case GET_MBRS_RSP:
      notifyResponse(data.getGroup(), data.getPingData());
      break;
  }
}
origin: wildfly/wildfly

@Override
public void receive(Address sender, byte[] buf, int offset, int length) {
  ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf, offset, length);
  GossipData data=new GossipData();
  try {
    data.readFrom(in);
    switch(data.getType()) {
      case MESSAGE:
      case SUSPECT:
        if(receiver != null)
          receiver.receive(data);
        break;
      case GET_MBRS_RSP:
        notifyResponse(data.getGroup(), data.getPingData());
        break;
    }
  }
  catch(Exception ex) {
    log.error(Util.getMessage("FailedReadingData"), ex);
  }
}
origin: org.jboss.eap/wildfly-client-all

@Override
public void receive(GossipData data) {
  switch (data.getType()) {
    case MESSAGE:
      if(Objects.equals(local_addr, data.getSender()))
        return;
      byte[] msg=data.getBuffer();
      receive(data.getSender(), msg, 0, msg.length);
      break;
    case SUSPECT:
      Address suspect=data.getAddress();
      if(suspect != null) {
        log.debug("%s: firing suspect event for %s", local_addr, suspect);
        up(new Event(Event.SUSPECT, Collections.singletonList(suspect)));
      }
      break;
  }
}
origin: org.jboss.eap/wildfly-client-all

public void receive(Address sender, DataInput in) throws Exception {
  GossipData data=new GossipData();
  data.readFrom(in);
  switch(data.getType()) {
    case MESSAGE:
    case SUSPECT:
      if(receiver != null)
        receiver.receive(data);
      break;
    case GET_MBRS_RSP:
      notifyResponse(data.getGroup(), data.getPingData());
      break;
  }
}
origin: org.jgroups/com.springsource.org.jgroups

req.readFrom(input);
switch(req.getType()) {
  case GossipRouter.REGISTER:
    mbr=req.getAddress();
origin: org.jboss.eap/wildfly-client-all

@Override
public void receive(Address sender, byte[] buf, int offset, int length) {
  ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf, offset, length);
  GossipData data=new GossipData();
  try {
    data.readFrom(in);
    switch(data.getType()) {
      case MESSAGE:
      case SUSPECT:
        if(receiver != null)
          receiver.receive(data);
        break;
      case GET_MBRS_RSP:
        notifyResponse(data.getGroup(), data.getPingData());
        break;
    }
  }
  catch(Exception ex) {
    log.error(Util.getMessage("FailedReadingData"), ex);
  }
}
org.jgroups.stackGossipDatagetType

Popular methods of GossipData

  • <init>
  • getAddress
  • getGroup
  • readFrom
  • writeTo
  • addPingData
  • getBuffer
  • getLogicalName
  • getPhysicalAddress
  • getPingData
  • getSender
  • serializedSize
  • getSender,
  • serializedSize,
  • setSender

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
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