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);
}
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());
}
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);
}
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;
}
Aggregations