X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Frequest%2FAsyncRead.java;h=f0856a7967fc6b12553239dbe4b1db7ddfa30287;hb=0d9b90834ce56b292c00b1a39850ed842c3e4d42;hp=a197a5f2169edeac7a501ee042d71b377be9f704;hpb=e5db6157fd8722c946613d4e46d7aaf6bfa92609;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db/src/org/simantics/db/request/AsyncRead.java b/bundles/org.simantics.db/src/org/simantics/db/request/AsyncRead.java index a197a5f21..f0856a796 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/request/AsyncRead.java +++ b/bundles/org.simantics.db/src/org/simantics/db/request/AsyncRead.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * Copyright (c) 2007, 2018 Association for Decentralized Information Management * in Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -50,7 +50,8 @@ import org.simantics.db.procedure.AsyncProcedure; * @see AsyncProcedure * @see Session */ -public interface AsyncRead extends Request { +@FunctionalInterface +public interface AsyncRead { /** * When a GraphRequest is serviced by the database session @@ -76,6 +77,13 @@ public interface AsyncRead extends Request { * be cancelled and any changes rolled back */ void perform(AsyncReadGraph graph, AsyncProcedure procedure); - int getFlags(); - - } + + default int getFlags() { + return 0; + } + + default int threadHash() { + return hashCode(); + } + +}