1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db;
14 import org.simantics.db.procedure.AsyncListener;
15 import org.simantics.db.procedure.AsyncProcedure;
16 import org.simantics.db.procedure.Listener;
17 import org.simantics.db.procedure.Procedure;
18 import org.simantics.db.procedure.SyncListener;
19 import org.simantics.db.procedure.SyncProcedure;
20 import org.simantics.db.request.AsyncMultiRead;
21 import org.simantics.db.request.AsyncRead;
22 import org.simantics.db.request.MultiRead;
23 import org.simantics.db.request.Read;
24 import org.simantics.db.request.ReadInterface;
25 import org.simantics.db.request.Write;
26 import org.simantics.db.request.WriteInterface;
27 import org.simantics.db.request.WriteOnly;
31 * For initiating requests in asynchronous manner. The possible requests are
33 * <li>{@link Read} for computing a single result synchronously
34 * <li>{@link AsyncRead} for computing a single result asynchronously
35 * <li>{@link MultiRead} for computing a collection of results synchronously
36 * <li>{@link AsyncMultiRead} for computing a collection of results
38 * <li>{@link Write} for reading and writing synchronously
39 * <li>{@link WriteOnly} for writing synchronously
42 * The standard AsyncRequestProcessors are
44 * <li>{@link AsyncReadGraph} for performing requests during other requests
45 * <li>{@link Session} for initiating a transactions for performing requests
46 * <li>{@link MergingGraphRequestProcessor} for merging several requests in a
50 * Database services (see e.g. {@link Session}) are available from implemented
51 * {@link ServiceLocator}. For a synchronous counterpart with the same
52 * functionality as AsyncRequestProcessor see {@link RequestProcessor}
55 * @author Antti Villberg
64 * @see MergingGraphRequestProcessor
65 * @see RequestProcessor
67 public interface AsyncRequestProcessor extends RequestProcessor, AsyncRequestProcessorSpecific {
69 <T> void async(ReadInterface<T> r, Procedure<T> procedure);
70 <T> void async(ReadInterface<T> r, AsyncProcedure<T> procedure);
71 <T> void async(ReadInterface<T> r, SyncProcedure<T> procedure);
72 <T> void async(ReadInterface<T> r, Listener<T> procedure);
73 <T> void async(ReadInterface<T> r, AsyncListener<T> procedure);
74 <T> void async(ReadInterface<T> r, SyncListener<T> procedure);