Tabnine Logo
org.jgroups.protocols
Code IndexAdd Tabnine to your IDE (free)

How to use org.jgroups.protocols

Best Java code snippets using org.jgroups.protocols (Showing top 20 results out of 315)

origin: wildfly/wildfly

/**
 * Reads an object from S3.
 * @param bucket  The name of the bucket where the object lives.
 * @param key     The name of the key to use.
 * @param headers A Map of String to List of Strings representing the http
 *                headers to pass (can be null).
 */
public GetResponse get(String bucket, String key, Map headers) throws IOException {
  return new GetResponse(makeRequest("GET", bucket, Utils.urlencode(key), null, headers));
}
origin: wildfly/wildfly

/**
 * Deletes an object from S3.
 * @param bucket  The name of the bucket where the object lives.
 * @param key     The name of the key to use.
 * @param headers A Map of String to List of Strings representing the http
 *                headers to pass (can be null).
 */
public Response delete(String bucket, String key, Map headers) throws IOException {
  return new Response(makeRequest("DELETE", bucket, Utils.urlencode(key), null, headers));
}
origin: wildfly/wildfly

public void run() {
  try {
    _run();
  }
  finally {
    discard_requests=false;
  }
  Request req=new ResendPendingRequests();
  sendRequest(null, req);
}
origin: wildfly/wildfly

protected static Request createRequest(RequestType type) {
  switch(type) {
    case COMPARE_AND_SET:         return new CompareAndSetRequest();
    case ADD_AND_GET:             return new AddAndGetRequest();
    case UPDATE:                  return new UpdateRequest();
    case GET_OR_CREATE:           return new GetOrCreateRequest();
    case DELETE:                  return new DeleteRequest();
    case SET:                     return new SetRequest();
    case RECONCILE:               return new ReconcileRequest();
    case RESEND_PENDING_REQUESTS: return new ResendPendingRequests();
    default:                      throw new IllegalArgumentException("failed creating a request from " + type);
  }
}
origin: wildfly/wildfly

protected static Response createResponse(ResponseType type) {
  switch(type) {
    case VOID:          return new SimpleResponse();
    case GET_OR_CREATE: return new GetOrCreateResponse();
    case BOOLEAN:       return new BooleanResponse();
    case VALUE:         return new ValueResponse();
    case EXCEPTION:     return new ExceptionResponse();
    case RECONCILE:     return new ReconcileResponse();
    default:            throw new IllegalArgumentException("failed creating a response from " + type);
  }
}
origin: wildfly/wildfly

public void doSend(byte[] buf, int offset, int length, Address dest) throws Exception {
  if(stats) {
    msg_stats.incrNumMsgsSent(1);
    msg_stats.incrNumBytesSent(length);
  }
  if(dest == null)
    sendMulticast(buf, offset, length);
  else
    sendToSingleMember(dest, buf, offset, length);
}
origin: wildfly/wildfly

public void stop() {
  super.stop();
  stopInfoWriter();
  remove(cluster_name, local_addr);
}
origin: wildfly/wildfly

static CallingFormat getCallingFormatForBucket(CallingFormat desiredFormat, String bucketName) {
  CallingFormat callingFormat=desiredFormat;
  if(callingFormat == CallingFormat.getSubdomainCallingFormat() && !Utils.isValidSubdomainBucketName(bucketName)) {
    callingFormat=CallingFormat.getPathCallingFormat();
  }
  return callingFormat;
}
origin: wildfly/wildfly

public void stop() {
  super.stop();
  is_server=is_coord=false;
  unregister(cluster_name, local_addr);
}
origin: wildfly/wildfly

protected void updateBackups(Type type, Owner obj) {
  synchronized(backups) {
    for(Address backup: backups)
      sendRequest(backup, type, obj.getRequestId(), obj.getAddress());
  }
}

origin: wildfly/wildfly

@Override
public void stop() {
  super.stop();
  if(is_coord)
    removeAll(cluster_name);
}
origin: wildfly/wildfly

public void destroy() {
  super.destroy();
  // We cannot clear the routing table, as it is shared between channels, and so we would clear the routing for
  // a different channel, too !
  unregister(cluster_name, local_addr);
}
origin: wildfly/wildfly

protected void handleLockDeniedResponse(String lock_name, int lock_id, Owner owner) {
   ClientLock lock=client_lock_table.getLock(lock_name,owner,false);
   if(lock != null)
     lock.lockDenied(lock_id);
}
origin: wildfly/wildfly

/**
 * Deletes a bucket.
 * @param bucket  The name of the bucket to delete.
 * @param headers A Map of String to List of Strings representing the http headers to pass (can be null).
 */
public Response deleteBucket(String bucket, Map headers) throws IOException {
  return new Response(makeRequest("DELETE", bucket, "", null, headers));
}
origin: wildfly/wildfly

@Override
public void awaitUninterruptibly() {
  try {
    await(false);
  }
  catch(InterruptedException e) {
    // This should never happen
  }
  finally {
    lock.lock();
  }
}
origin: wildfly/wildfly

@Override
protected void remove(String clustername, Address addr) {
  String fileName = clustername + "/" + addressToFilename(addr);
  rackspaceClient.deleteObject(container, fileName);
}
origin: wildfly/wildfly

/**
 * List all the buckets created by this account.
 * @param headers A Map of String to List of Strings representing the http
 *                headers to pass (can be null).
 */
public ListAllMyBucketsResponse listAllMyBuckets(Map headers)
    throws IOException {
  return new ListAllMyBucketsResponse(makeRequest("GET", "", "", null, headers));
}
origin: wildfly/wildfly

@Override
public void init() throws Exception {
  if (this.secret_key == null) {
    readSecretKeyFromKeystore();
  }
  super.init();
}
origin: wildfly/wildfly

protected void handleLockGrantedResponse(String lock_name, int lock_id, Owner owner) {
  ClientLock lock=client_lock_table.getLock(lock_name,owner,false);
  if(lock != null)
    lock.handleLockGrantedResponse(lock_id);
}
origin: wildfly/wildfly

protected void handleLockReleasedResponse(String lock_name, int lock_id, Owner owner) {
  ClientLock lock=client_lock_table.getLock(lock_name,owner,false);
  if(lock != null)
    lock.handleLockReleasedResponse(lock_id);
}
org.jgroups.protocols

Most used classes

  • TP
    Generic transport - specific implementations should extend this abstract class. Features which are p
  • PingData
    Encapsulates information about a cluster node, e.g. local address, coordinator's address, logical na
  • Discovery
    The Discovery protocol retrieves the initial membership (used by GMS and MERGE3) by sending discover
  • FORK
    The FORK protocol; multiplexes messages to different forks in a stack (https://issues.jboss.org/brow
  • UDP
    IP multicast transport based on UDP. Messages to the group (msg.dest == null) will be multicast (to
  • PingHeader,
  • GMS,
  • RELAY2,
  • RelayConfig$SiteConfig,
  • AUTH,
  • JDBC_PING,
  • MPING,
  • PING,
  • NakAckHeader2,
  • AuthHeader,
  • CENTRAL_LOCK,
  • DELAY,
  • DISCARD,
  • Encrypt
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