@Override public IndexHits<T> get(String key, Object value) { if (value.equals("refnode")) { return new IteratorIndexHits<T>(Arrays.asList((T) db.getReferenceNode())); } return new IteratorIndexHits<T>(Collections.<T>emptyList()); }
@Override protected void create() { life.add(new BranchedDataMigrator(storeDir)); masterDelegateInvocationHandler = new DelegateInvocationHandler(); master = (Master) Proxy.newProxyInstance( Master.class.getClassLoader(), new Class[] {Master.class}, masterDelegateInvocationHandler); super.create(); kernelEventHandlers.registerKernelEventHandler( new HaKernelPanicHandler(xaDataSourceManager, (TxManager) txManager, availabilityGuard)); life.add( updatePuller = new UpdatePuller( (HaXaDataSourceManager) xaDataSourceManager, master, requestContextFactory, txManager, availabilityGuard, lastUpdateTime, config, msgLog)); stateSwitchTimeoutMillis = config.get(HaSettings.state_switch_timeout); life.add(paxosLife); life.add(new DatabaseAvailability(txManager, availabilityGuard)); life.add(new StartupWaiter()); diagnosticsManager.appendProvider( new HighAvailabilityDiagnostics(memberStateMachine, clusterClient)); }
private void destroy(GraphDatabaseService dbToDestroy) throws IOException { InternalAbstractGraphDatabase db = (InternalAbstractGraphDatabase) dbToDestroy; dbToDestroy.shutdown(); FileUtils.deleteDirectory(new File(db.getStoreDir())); }