/** * Gets the instance of RepositoryManager. * @return the instance of RepositoryManager */ public static RepositoryManager getInstance() { if (manager == null) { manager = new RepositoryManager(); } return manager; }
/** * Closes all the repositories. */ public void shutDownAll() { synchronized (_repoMap) { for (String id : _repoMap.keySet()) { Repository repo = _repoMap.remove(id); if (repo != null) { shutdown(repo); } } _repoMap.clear(); } }
/** * Setup fixture for all tests. * * @throws Exception never otherwise tests fail. */ @BeforeClass public static void setUp() throws Exception { TRIPLE_STORE = newTripleStore(); SAIL = new CumulusRDFSail(TRIPLE_STORE); REPOSITORY = new SailRepository(SAIL); REPOSITORY.initialize(); RepositoryManager.getInstance().addRepository(REPO_ID, REPOSITORY, true); }
/** * Closes all the repositories. */ public void shutDownAll() { synchronized (_repoMap) { for (String id : _repoMap.keySet()) { Repository repo = _repoMap.remove(id); if (repo != null) { shutdown(repo); } } _repoMap.clear(); } }
/** * Gets the instance of RepositoryManager. * @return the instance of RepositoryManager */ public static RepositoryManager getInstance() { if (manager == null) { manager = new RepositoryManager(); } return manager; }