@Test public void updateElements() throws ConfigurationException { app.createElements(); assertFalse(g.V().has("name", "jupiter").has("ts").hasNext()); app.updateElements(); final long ts1 = (long) g.V().has("name", "jupiter").values("ts").next(); app.updateElements(); final long ts2 = (long) g.V().has("name", "jupiter").values("ts").next(); assertTrue(ts2 > ts1); }
public void updateElements() { try { if (g == null) { return; } LOGGER.info("updating elements"); final long ts = System.currentTimeMillis(); g.V().has("name", "jupiter").property("ts", ts).iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } }
GraphApp { public void updateElements() { try { if (g == null) { return; } LOGGER.info("updating elements"); final long ts = System.currentTimeMillis(); g.V().has("name", "jupiter").property("ts", ts).iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } }
GraphApp { public void updateElements() { try { if (g == null) { return; } LOGGER.info("updating elements"); final long ts = System.currentTimeMillis(); g.V().has("name", "jupiter").property("ts", ts).iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } GraphApp(final String fileName); }
GraphApp { public void updateElements() { try { if (g == null) { return; } LOGGER.info("updating elements"); final long ts = System.currentTimeMillis(); g.V().has("name", "jupiter").property("ts", ts).iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } GraphApp(final String fileName); GraphTraversalSource openGraph(); void closeGraph(); void dropGraph(); void createSchema(); void createElements(); void readElements(); void updateElements(); void deleteElements(); void runApp(); }
GraphApp { public void updateElements() { try { if (g == null) { return; } LOGGER.info("updating elements"); final long ts = System.currentTimeMillis(); g.V().has("name", "jupiter").property("ts", ts).iterate(); if (supportsTransactions) { g.tx().commit(); } } catch (Exception e) { LOGGER.error(e.getMessage(), e); if (supportsTransactions) { g.tx().rollback(); } } } GraphApp(final String fileName); GraphTraversalSource openGraph(); void closeGraph(); void dropGraph(); void createSchema(); void createElements(); void readElements(); void updateElements(); void deleteElements(); void runApp();  }