Package com.hp.hpl.jena.tdb.transaction

Examples of com.hp.hpl.jena.tdb.transaction.DatasetGraphTxn.end()


       
        DatasetGraphTxn dsgTxn2 = sConn2.begin(ReadWrite.READ) ;
        if ( nonTxnData )
            assertTrue(dsgTxn2.contains(q)) ;
        assertTrue(dsgTxn2.contains(q1)) ;
        dsgTxn2.end() ;

        // Check API methods work.
        Dataset ds = TDBFactory.createDataset(loc) ;
        ds.begin(ReadWrite.READ) ;
        Model m = (q.isDefaultGraph() ? ds.getDefaultModel() : ds.getNamedModel("g")) ;
View Full Code Here


                ex.printStackTrace(System.err) ;
                System.exit(1) ;
                if ( dsg != null )
                {
                    dsg.abort() ;
                    dsg.end() ;
                    dsg = null ;
                }
               
                return null ;
            }
View Full Code Here

                                    NodeFactory.createURI("http://openjena.org/"
                                            + numberGenerator.nextInt()),
                                    NodeFactory.createURI("http://openjena.org/"
                                            + numberGenerator.nextInt())));
                            txnGraph.commit();
                            txnGraph.end();
                            nbQuadruplesAdded.incrementAndGet();
                        } else {
                            DatasetGraphTxn txnGraph =
                                    storeConnection.begin(ReadWrite.READ);
                            txnGraph.find(Node.ANY, Node.ANY, Node.ANY, Node.ANY);
View Full Code Here

                            DatasetGraphTxn txnGraph =
                                    storeConnection.begin(ReadWrite.READ);
                            txnGraph.find(Node.ANY, Node.ANY, Node.ANY, Node.ANY);
                            //Iterator<Quad> iter = txnGraph.find(Node.ANY, Node.ANY, Node.ANY, Node.ANY);
                            //Iter.count(iter) ; // Consume
                            txnGraph.end();
                        }
                    } finally {
                        doneSignal.countDown();
                    }
                }
View Full Code Here

        while (result.hasNext()) {
            result.next();
            count++;
        }
       
        txnGraph.end();
       
        StoreConnection.release(storeConnection.getLocation());

        //System.out.println() ;
        System.out.println("FINISHED") ;
View Full Code Here

                    pause(maxpause) ;
                    int x2 = count("SELECT * { ?s ?p ?o }", dsg) ;
                    if (x1 != x2) log.warn(format("READER: %s Change seen: %d/%d : id=%d: i=%d",
                                                  dsg.getTransaction().getLabel(), x1, x2, id, i)) ;
                    log.debug("reader finish " + id + "/" + i) ;
                    dsg.end() ;
                    dsg = null ;
                }
                return null ;
            } catch (RuntimeException ex)
            {
View Full Code Here

            {
                ex.printStackTrace(System.err) ;
                if ( dsg != null )
                {
                    dsg.abort() ;
                    dsg.end() ;
                    dsg = null ;
                }
                return null ;
            }
        }
View Full Code Here

                        SysTxnState state = txnMgr.state() ;
                        String label = dsg.getTransaction().getLabel() ;
                        log.warn(format("WRITER: %s Change seen: %d + %d != %d : id=%d: i=%d", label, x1, z, x2, id, i)) ;
                        log.warn(state.toString()) ;
                        dsg.abort() ;
                        dsg.end() ;
                        dsg = null ;
                        return null ;
                    }
                    if (commit)
                        dsg.commit() ;
View Full Code Here

                    else
                        dsg.abort() ;
                    SysTxnState state = sConn.getTransMgrState() ;
                    log.debug(state.toString()) ;
                    log.debug("writer finish "+id+"/"+i) ;               
                    dsg.end() ;
                    dsg = null ;
                }
                return null ;
            }
            catch (RuntimeException ex)
View Full Code Here

            {
                ex.printStackTrace(System.err) ;
                if ( dsg != null )
                {
                    dsg.abort() ;
                    dsg.end() ;
                    dsg = null ;
                }
                return null ;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.