/** * * @param service the unique name of the service processing this * @param documentsAndUpdates the document operation list. This <b>transfers ownership</b> of this list * to this class. The caller <i>must not</i> modify it * @param callStack the document processors to call in this processing. * This <b>transfers ownership</b> of this structure * to this class. The caller <i>must not</i> modify it */ public static Processing createProcessingFromDocumentOperations(String service, List<DocumentOperation> documentsAndUpdates, CallStack callStack) { return new Processing(service, documentsAndUpdates, callStack, null, false); }
/** * Create a Processing from the given document operation */ public static Processing of(DocumentOperation documentOperation) { return new Processing(documentOperation); }
static Processing createProcessingFromDocumentOperations(String service, List<DocumentOperation> documentOpsAndUpdates, CallStack callStack, ProcessingEndpoint endp) { return new Processing(service, documentOpsAndUpdates, callStack, endp, false); }
/** * Asynchronously process the given document put or document update using the processing * chain of this service, and call the specified ProcessingEndpoint when done. * * @throws RuntimeException caused by a QueueFullException if this DocprocService has a bounded input queue and the queue is full * @throws IllegalStateException if this DocprocService is not accepting new incoming processings */ public void process(DocumentOperation documentOperation, ProcessingEndpoint endp) { addProcessing(new Processing(getName(), documentOperation, new CallStack(getCallStack()), endp)); }
private Processing createProcessing(DocumentOperation documentOperation, Message message) { Processing processing = new Processing(); processing.addDocumentOperation(documentOperation); processing.setServiceName(serviceName); processing.setDocprocServiceRegistry(docprocServiceComponentRegistry); processing.setVariable("route", message.getRoute()); processing.setVariable("timeout", message.getTimeRemaining()); return processing; } }