@Test public void testGetSession() throws ResourceNotExistingException, TTException { ISession session = StorageManager.getSession(mStorageName); assertNotNull(session); assertNotNull(session.beginBucketWtx()); assertTrue(session.close()); }
public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { File storageFile = new File(STORAGE_PATH); ISession session = null; if (!storageFile.exists()) { throw new ResourceNotExistingException(); } else { new StorageConfiguration(storageFile); IStorage storage = Storage.openStorage(storageFile); session = storage.getSession(new SessionConfiguration(resourceName, null)); } return session; }
StorageManager { public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { File storageFile = new File(STORAGE_PATH); ISession session = null; if (!storageFile.exists()) { throw new ResourceNotExistingException(); } else { new StorageConfiguration(storageFile); IStorage storage = Storage.openStorage(storageFile); session = storage.getSession(new SessionConfiguration(resourceName, null)); } return session; } }
StorageManager { public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { File storageFile = new File(STORAGE_PATH); ISession session = null; if (!storageFile.exists()) { throw new ResourceNotExistingException(); } else { new StorageConfiguration(storageFile); IStorage storage = Storage.openStorage(storageFile); session = storage.getSession(new SessionConfiguration(resourceName, null)); } return session; }  }
StorageManager { public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { File storageFile = new File(STORAGE_PATH); ISession session = null; if (!storageFile.exists()) { throw new ResourceNotExistingException(); } else { new StorageConfiguration(storageFile); IStorage storage = Storage.openStorage(storageFile); session = storage.getSession(new SessionConfiguration(resourceName, null)); } return session; }  static boolean createResource(String name, AbstractModule module); static List<String> getResources(); static ISession getSession(String resourceName); static void removeResource(String pResourceName); }
StorageManager { public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { File storageFile = new File(STORAGE_PATH); ISession session = null; if (!storageFile.exists()) { throw new ResourceNotExistingException(); } else { new StorageConfiguration(storageFile); IStorage storage = Storage.openStorage(storageFile); session = storage.getSession(new SessionConfiguration(resourceName, null)); } return session; }  static boolean createResource(String name, AbstractModule module); static List<String> getResources(); static ISession getSession(String resourceName); static void removeResource(String pResourceName); static final int BACKEND_INDEX_JCLOUDS; static final String ROOT_PATH; static final String STORAGE_PATH; }