commit | f20a507b81ca997b101592d9b1c923f27d6a441e | [log] [tgz] |
---|---|---|
author | Toshio Koide <t-koide@onlab.us> | Thu Jun 13 13:18:22 2013 -0700 |
committer | Toshio Koide <t-koide@onlab.us> | Thu Jun 13 13:18:22 2013 -0700 |
tree | 81b72330a156527a2bfcaf6b9ab3702b8afe5b62 | |
parent | a9a0300fdd0c4eedc4aeaa8a74c067e0e1776636 [diff] |
add close() method to close GraphDBConnection via GraphDBOperation, and update interface class's definition
diff --git a/src/main/java/net/onrc/onos/util/GraphDBOperation.java b/src/main/java/net/onrc/onos/util/GraphDBOperation.java index 1d5ab20..e097bf9 100644 --- a/src/main/java/net/onrc/onos/util/GraphDBOperation.java +++ b/src/main/java/net/onrc/onos/util/GraphDBOperation.java
@@ -271,4 +271,8 @@ public void rollback() { conn.endTx(Transaction.ROLLBACK); } + + public void close() { + conn.close(); + } }
diff --git a/src/main/java/net/onrc/onos/util/IDBOperation.java b/src/main/java/net/onrc/onos/util/IDBOperation.java index 2eeb527..1a8571d 100644 --- a/src/main/java/net/onrc/onos/util/IDBOperation.java +++ b/src/main/java/net/onrc/onos/util/IDBOperation.java
@@ -38,5 +38,8 @@ public Iterable<IFlowEntry> getAllFlowEntries(); public void removeFlowEntry(IFlowEntry flowEntry); - public IDBConnection getDBConnection(); + public IDBConnection getDBConnection(); + public void commit(); + public void rollback(); + public void close(); }