Codota Logo
TpHeader.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.jgroups.protocols.TpHeader
constructor

Best Java code snippets using org.jgroups.protocols.TpHeader.<init> (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

public static List<Message> readMessageList(DataInput in, short transport_id) throws Exception {
  List<Message> list=new LinkedList<>();
  Address dest=Util.readAddress(in);
  Address src=Util.readAddress(in);
  // AsciiString cluster_name=Bits.readAsciiString(in); // not used here
  short length=in.readShort();
  byte[] cluster_name=length >= 0? new byte[length] : null;
  if(cluster_name != null)
    in.readFully(cluster_name, 0, cluster_name.length);
  int len=in.readInt();
  for(int i=0; i < len; i++) {
    Message msg=new Message(false);
    msg.readFrom(in);
    msg.setDest(dest);
    if(msg.getSrc() == null)
      msg.setSrc(src);
    // Now add a TpHeader back on, was not marshalled. Every message references the *same* TpHeader, saving memory !
    msg.putHeader(transport_id, new TpHeader(cluster_name));
    list.add(msg);
  }
  return list;
}
origin: wildfly/wildfly

public void up(MessageBatch batch) {
  // let unicast message batches pass
  if(batch.dest() != null
   && (batch.mode() == MessageBatch.Mode.OOB && batch.mode() == MessageBatch.Mode.INTERNAL)
   || holes.contains(batch.sender())) {
    up_prot.up(batch);
    return;
  }
  if(barrier_closed.get()) {
    final Map<Address,Message> map=batch.dest() == null? mcast_queue : ucast_queue;
    map.put(batch.sender(), batch.last().putHeader(transport.getId(),new TpHeader(batch.clusterName())));
    return; // queue the last message of the batch and drop the batch
  }
  Thread current_thread=Thread.currentThread();
  in_flight_threads.put(current_thread, NULL);
  try {
    up_prot.up(batch);
  }
  finally {
    unblock(current_thread);
  }
}
origin: wildfly/wildfly

case Event.CONNECT_WITH_STATE_TRANSFER_USE_FLUSH:
  cluster_name=new AsciiString((String)evt.getArg());
  header=new TpHeader(cluster_name);
origin: org.jboss.eap/wildfly-client-all

public static List<Message> readMessageList(DataInput in, short transport_id) throws Exception {
  List<Message> list=new LinkedList<>();
  Address dest=Util.readAddress(in);
  Address src=Util.readAddress(in);
  // AsciiString cluster_name=Bits.readAsciiString(in); // not used here
  short length=in.readShort();
  byte[] cluster_name=length >= 0? new byte[length] : null;
  if(cluster_name != null)
    in.readFully(cluster_name, 0, cluster_name.length);
  int len=in.readInt();
  for(int i=0; i < len; i++) {
    Message msg=new Message(false);
    msg.readFrom(in);
    msg.setDest(dest);
    if(msg.getSrc() == null)
      msg.setSrc(src);
    // Now add a TpHeader back on, was not marshalled. Every message references the *same* TpHeader, saving memory !
    msg.putHeader(transport_id, new TpHeader(cluster_name));
    list.add(msg);
  }
  return list;
}
origin: org.jgroups/com.springsource.org.jgroups

protected Object handleDownEvent(Event evt) {
  switch(evt.getType()) {
  case Event.TMP_VIEW:
  case Event.VIEW_CHANGE:
    synchronized(members) {
      view=(View)evt.getArg();
      members.clear();
      Vector<Address> tmpvec=view.getMembers();
      members.addAll(tmpvec);
    }
    break;
  case Event.CONNECT:
    channel_name=(String)evt.getArg();
    header=new TpHeader(channel_name);
    setThreadNames();
    return null;
  case Event.DISCONNECT:
    unsetThreadNames();
    break;
  case Event.CONFIG:
    if(log.isDebugEnabled()) log.debug("received CONFIG event: " + evt.getArg());
    handleConfigEvent((HashMap)evt.getArg());
    break;
  }
  return null;
}
origin: org.jboss.eap/wildfly-client-all

public void up(MessageBatch batch) {
  // let unicast message batches pass
  if(batch.dest() != null
   && (batch.mode() == MessageBatch.Mode.OOB && batch.mode() == MessageBatch.Mode.INTERNAL)
   || holes.contains(batch.sender())) {
    up_prot.up(batch);
    return;
  }
  if(barrier_closed.get()) {
    final Map<Address,Message> map=batch.dest() == null? mcast_queue : ucast_queue;
    map.put(batch.sender(), batch.last().putHeader(transport.getId(),new TpHeader(batch.clusterName())));
    return; // queue the last message of the batch and drop the batch
  }
  Thread current_thread=Thread.currentThread();
  in_flight_threads.put(current_thread, NULL);
  try {
    up_prot.up(batch);
  }
  finally {
    unblock(current_thread);
  }
}
origin: org.jboss.eap/wildfly-client-all

case Event.CONNECT_WITH_STATE_TRANSFER_USE_FLUSH:
  cluster_name=new AsciiString((String)evt.getArg());
  header=new TpHeader(cluster_name);
org.jgroups.protocolsTpHeader<init>

Popular methods of TpHeader

  • getClusterName

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
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