Search in sources :

Example 1 with DocumentResponse

use of com.yahoo.documentapi.DocumentResponse in project vespa by vespa-engine.

the class LocalAsyncSession method put.

@Override
public Result put(Document document, DocumentProtocol.Priority pri) {
    long req = getNextRequestId();
    try {
        syncSession.put(new DocumentPut(document), pri);
        addResponse(new DocumentResponse(req));
    } catch (Exception e) {
        addResponse(new DocumentResponse(req, document, e.getMessage(), false));
    }
    return new Result(req);
}
Also used : DocumentResponse(com.yahoo.documentapi.DocumentResponse) DocumentPut(com.yahoo.document.DocumentPut) Result(com.yahoo.documentapi.Result)

Aggregations

DocumentPut (com.yahoo.document.DocumentPut)1 DocumentResponse (com.yahoo.documentapi.DocumentResponse)1 Result (com.yahoo.documentapi.Result)1