]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.impl/src/org/simantics/db/impl/VirtualGraphImpl.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / VirtualGraphImpl.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.db.impl;
13
14 import java.util.function.Consumer;
15
16 import org.simantics.db.VirtualGraph;
17 import org.simantics.db.exception.DatabaseException;
18 import org.simantics.db.impl.graph.ReadGraphImpl;
19
20 public interface VirtualGraphImpl extends VirtualGraph {
21
22     public int newResource(boolean lazy);
23
24         public void claim(int subject, int predicate, int object);
25     public int[] getObjects(int subject, int predicate);
26     public int[] getPredicates(int subject);
27     public byte[] getValue(int resource);
28     public void deny(int subject, int predicate, int object);
29     public void claimValue(int resource, byte[] object, int length);
30     public void denyValue(int resource);
31     
32     public boolean isPending(int resource);
33     public boolean isPending(int resource, int predicate);
34     
35     public void load(ReadGraphImpl graph, int resource, int predicate, Consumer<ReadGraphImpl> callback) throws DatabaseException;
36     public void load(ReadGraphImpl graph, int resource, Consumer<ReadGraphImpl> callback) throws DatabaseException;
37
38 }
39