Search in sources :

Example 6 with RemoveDocumentMessage

use of com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage in project vespa by vespa-engine.

the class SingleSender method remove.

@Override
public void remove(DocumentId docId, TestAndSetCondition condition) {
    RemoveDocumentMessage message = new RemoveDocumentMessage(docId);
    message.setCondition(condition);
    send(message);
}
Also used : RemoveDocumentMessage(com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage)

Example 7 with RemoveDocumentMessage

use of com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage in project vespa by vespa-engine.

the class DocumentProcessingHandlerAllMessageTypesTestCase method remove.

private void remove() throws InterruptedException {
    RemoveDocumentMessage message = new RemoveDocumentMessage(new DocumentId("doc:12345:6789"));
    assertTrue(sendMessage(FOOBAR, message));
    Message result = remoteServer.awaitMessage(60, TimeUnit.SECONDS);
    assertNotNull(result);
    remoteServer.ackMessage(result);
    Reply reply = driver.client().awaitReply(60, TimeUnit.SECONDS);
    assertNotNull(reply);
    assertThat(result, instanceOf(RemoveDocumentMessage.class));
    RemoveDocumentMessage outputMsg = (RemoveDocumentMessage) result;
    assertThat(outputMsg.getDocumentId().toString(), is("doc:12345:6789"));
    assertFalse(reply.hasErrors());
}
Also used : RemoveDocumentMessage(com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage) PutDocumentMessage(com.yahoo.documentapi.messagebus.protocol.PutDocumentMessage) UpdateDocumentMessage(com.yahoo.documentapi.messagebus.protocol.UpdateDocumentMessage) Message(com.yahoo.messagebus.Message) GetDocumentMessage(com.yahoo.documentapi.messagebus.protocol.GetDocumentMessage) RemoveDocumentMessage(com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage) BatchDocumentUpdateMessage(com.yahoo.documentapi.messagebus.protocol.BatchDocumentUpdateMessage) Reply(com.yahoo.messagebus.Reply)

Example 8 with RemoveDocumentMessage

use of com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage in project vespa by vespa-engine.

the class MessageBusSyncSession method remove.

@Override
public boolean remove(DocumentRemove documentRemove) {
    RemoveDocumentMessage msg = new RemoveDocumentMessage(documentRemove.getId());
    msg.setCondition(documentRemove.getCondition());
    return remove(msg);
}
Also used : RemoveDocumentMessage(com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage)

Example 9 with RemoveDocumentMessage

use of com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage in project vespa by vespa-engine.

the class PolicyFactoryTestCase method createMessage.

// //////////////////////////////////////////////////////////////////////////////
// 
// Utilities
// 
// //////////////////////////////////////////////////////////////////////////////
private static Message createMessage() {
    Message msg = new RemoveDocumentMessage(new DocumentId("doc:scheme:"));
    msg.getTrace().setLevel(9);
    return msg;
}
Also used : RemoveDocumentMessage(com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage) RemoveDocumentMessage(com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage) DocumentId(com.yahoo.document.DocumentId)

Aggregations

RemoveDocumentMessage (com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage)9 PutDocumentMessage (com.yahoo.documentapi.messagebus.protocol.PutDocumentMessage)5 UpdateDocumentMessage (com.yahoo.documentapi.messagebus.protocol.UpdateDocumentMessage)4 Message (com.yahoo.messagebus.Message)3 DocumentRemove (com.yahoo.document.DocumentRemove)2 Tuple2 (com.yahoo.collections.Tuple2)1 DocumentId (com.yahoo.document.DocumentId)1 BatchDocumentUpdateMessage (com.yahoo.documentapi.messagebus.protocol.BatchDocumentUpdateMessage)1 DocumentMessage (com.yahoo.documentapi.messagebus.protocol.DocumentMessage)1 GetDocumentMessage (com.yahoo.documentapi.messagebus.protocol.GetDocumentMessage)1 EmptyReply (com.yahoo.messagebus.EmptyReply)1 Error (com.yahoo.messagebus.Error)1 Reply (com.yahoo.messagebus.Reply)1 Utf8String (com.yahoo.text.Utf8String)1 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)1