예제 #1
0
 public void shutdown() {
   try {
     if (database != null) database.shutdown();
   } finally {
     deleteResources();
     database = null;
   }
 }
예제 #2
0
 public void create() throws IOException {
   createResources();
   try {
     GraphDatabaseFactory factory = newFactory();
     configure(factory);
     GraphDatabaseBuilder builder = newBuilder(factory);
     configure(builder);
     database = (GraphDatabaseAPI) builder.newGraphDatabase();
   } catch (RuntimeException e) {
     deleteResources();
     throw e;
   }
 }