congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
InsertMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
InsertMessage
in
com.eightkdata.mongowp.messages.request

Best Java code snippets using com.eightkdata.mongowp.messages.request.InsertMessage (Showing top 3 results out of 315)

origin: com.8kdata.mongowp.server/mongo-server-api

@Override
public void insert(InsertMessage insertMessage, MessageReplier messageReplier) {
 C connection = getConnection(messageReplier);
 try {
  Request req = new Request(
    insertMessage.getDatabase(),
    new ExternalClientInfo(insertMessage.getClientAddress(), insertMessage.getRequestId()),
    false,
    null //Set the requested timeout
  );
  safeRequestProcessor.insert(connection, req, insertMessage);
 } catch (MongoException ex) {
  errorHandler.handleMongodbException(connection, messageReplier.getRequestId(), false, ex);
 }
}
origin: com.8kdata.mongowp/mongowp-core

 @Override
 public String toString() {
  StringBuilder sb = new StringBuilder();

  sb.append("InsertMessage{")
    .append(super.toString())
    .append(", database='")
    .append(database)
    .append("' , collection='")
    .append(collection)
    .append('\'');

  if (getDataContext().isValid()) {
   //TODO: This must be changed to preserve privacy on logs
   int docsLimit = 10;
   sb.append(", documents (limited to ").append(docsLimit).append(")=")
     .append(
       Iterables.toString(
         documents.getIterable(AllocationType.HEAP).limit(docsLimit)
       ));
  } else {
   sb.append(", documents=<not available>");
  }
  return sb.append('}').toString();
 }
}
origin: com.8kdata.mongowp.server/wp-layer

@Override
@SuppressFBWarnings(value = {"RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"},
  justification = "Findbugs thinks ByteBuf#readerIndex(...) has no"
  + "side effect")
public InsertMessage decode(ByteBuf buffer, RequestBaseMessage requestBaseMessage) throws
  InvalidNamespaceException, InvalidBsonException {
 try {
  MyBsonContext context = new MyBsonContext(buffer);
  int flags = buffer.readInt();
  String fullCollectionName = stringReader.readCString(buffer, true);
  ByteBuf docBuf = buffer.slice(buffer.readerIndex(), buffer.readableBytes());
  docBuf.retain();
  buffer.readerIndex(buffer.writerIndex());
  ByteBufIterableDocumentProvider documents = new ByteBufIterableDocumentProvider(docBuf,
    docReader);
  //TODO: improve the way database and cache are pooled
  return new InsertMessage(
    requestBaseMessage,
    context,
    getDatabase(fullCollectionName).intern(),
    getCollection(fullCollectionName).intern(),
    EnumInt32FlagsUtil.isActive(Flag.CONTINUE_ON_ERROR, flags),
    documents
  );
 } catch (NettyBsonReaderException ex) {
  throw new InvalidBsonException(ex);
 }
}
com.eightkdata.mongowp.messages.requestInsertMessage

Most used methods

  • <init>
  • getClientAddress
  • getDataContext
  • getDatabase
  • getRequestId

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • getContentResolver (Context)
  • startActivity (Activity)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JFrame (javax.swing)
  • Best IntelliJ plugins
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