Package com.graphaware.tx.event.batch.api

Examples of com.graphaware.tx.event.batch.api.TransactionSimulatingBatchInserterImpl


                        r1.removeProperty("time");
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Relationship r1 = getNodeById(5).getSingleRelationship(withName("R5"), OUTGOING);
        assertEquals(1, count(r1.getPropertyKeys()));
        assertEquals("someValue", r1.getProperty("additional"));
        assertFalse(r1.hasProperty("time"));
View Full Code Here


                        createdNode.removeProperty("size");
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Node createdNode = getNodeById(5L);

        assertEquals("NewFive", createdNode.getProperty("name"));
        assertEquals("something", createdNode.getProperty("additional"));
View Full Code Here

                        r.removeProperty("tags");
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Relationship r = getNodeById(3).getSingleRelationship(withName("R3"), OUTGOING);

        assertEquals(2, count(r.getPropertyKeys()));
        assertEquals(5, r.getProperty("time"));
View Full Code Here

                        r.removeProperty("tags");
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Relationship r = getNodeById(3).getSingleRelationship(withName("R3"), OUTGOING);

        assertEquals(2, count(r.getPropertyKeys()));
        assertEquals(5, r.getProperty("time"));
View Full Code Here

                        node.removeProperty("tags");
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Node node = getNodeById(1L);

        assertEquals(2, count(node.getPropertyKeys()));
        assertEquals("YetAnotherOne", node.getProperty("name"));
View Full Code Here

                        node.removeProperty("tags");
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Node node = getNodeById(1L);

        assertEquals(2, count(node.getPropertyKeys()));
        assertEquals("YetAnotherOne", node.getProperty("name"));
View Full Code Here

                        assertEquals(true, newRelationship.getProperty("new"));
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Relationship newRelationship = getNodeById(1).getSingleRelationship(withName("R6"), OUTGOING);
        assertNotNull(newRelationship);
        assertEquals("Six", newRelationship.getEndNode().getProperty("name"));
        assertEquals(true, newRelationship.getProperty("new"));
View Full Code Here

                        node.createRelationshipTo(newNode, withName("R6")).setProperty("new", true);
                    }
                }
        );

        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        Relationship newRelationship = getNodeById(1).getSingleRelationship(withName("R6"), OUTGOING);
        assertNotNull(newRelationship);
        assertEquals("Six", newRelationship.getEndNode().getProperty("name"));
        assertEquals(true, newRelationship.getProperty("new"));
View Full Code Here

        );
    }

    @Test
    public void verifyAutoCommit() {
        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        populateDatabase();

        batchInserter.shutdown();
        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()), 28);

        final AtomicInteger numberOfCommits = new AtomicInteger(0);

        mutateGraph(
                new BeforeCommitCallback() {
View Full Code Here

        assertEquals(2, numberOfCommits.get());
    }

    @Test
    public void shouldReturnNoNodesWhenNothingInTheDatabase() {
        batchInserter = new TransactionSimulatingBatchInserterImpl(BatchInserters.inserter(temporaryFolder.getRoot().getAbsolutePath()));

        assertFalse(batchInserter.getAllNodes().iterator().hasNext());
    }
View Full Code Here

TOP

Related Classes of com.graphaware.tx.event.batch.api.TransactionSimulatingBatchInserterImpl

Copyright © 2018 www.massapicom. 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.