ServiceRefPodRootSystem(SchemePod podScheme, ServicesAmp manager, PodBartender pod, String address) { super(podScheme, manager, pod, address); if (manager != AmpSystem.currentManager()) { throw new IllegalStateException(); } }
public static ServicesAmp currentManager() { AmpSystem system = getCurrent(); if (system == null) { throw new IllegalStateException(L.l("{0} is not available in {1}", AmpSystem.class.getName(), Thread.currentThread().getContextClassLoader())); } return system.getManager(); }
_timer = AmpSystem.getCurrent().getTimerService(); _rampManager = AmpSystem.currentManager();
void boot(boolean isClean) throws Exception { Thread thread = Thread.currentThread(); _oldLoader = thread.getContextClassLoader(); _envLoader = EnvironmentClassLoader.create(_oldLoader, "test-loader"); thread.setContextClassLoader(_envLoader); setLoggingLevels(); String baratineRoot = getWorkDir(); System.setProperty("baratine.root", baratineRoot); long startTime = getStartTime(); TestTime.clear(); if (startTime != -1) { TestTime.setTime(startTime); RandomUtil.setTestSeed(startTime); } try { if (isClean) { VfsOld.lookup(baratineRoot).removeAll(); } } catch (Exception e) { } _system = new SystemManager("junit-test", _envLoader); AmpSystem.createAndAddSystem("localhost:8086").start(); _rootDir = RootDirectorySystem.createAndAddSystem(Vfs.path(baratineRoot)); TempStoreSystem.createAndAddSystem(); KrakenSystem.createAndAddSystem( new ServerBartenderJunit("localhost", 8086)); JournalSystem.createAndAddSystem(); _system.start(); }
public ServicesAmp getManager() { return _ampSystem.getManager(); }
/** * */ protected void addPreTopologyServices() { WarningSystem.createAndAddSystem(); //ShutdownSystem.createAndAddSystem(isEmbedded()); boolean isEmbedded = true; ShutdownSystem.createAndAddSystem(isEmbedded); AmpSystem.createAndAddSystem(getServerId()); //DeploySystem.createAndAddSystem(); DeploySystem2.createAndAddSystem(); /* SecuritySystem security = SecuritySystem.createAndAddSystem(); String clusterKey = config().get("baratine.cluster.key"); security.setSignatureSecret(clusterKey); */ // HealthStatusService.createAndAddService(); // BlockManagerSubSystem.createAndAddService(); //createKrakenStoreSystem(); // ShutdownSystem.getCurrent().addMemoryFreeTask(new BlockManagerMemoryFreeTask()); /* if (! isWatchdog()) { HealthSubSystem health = HealthSubSystem.createAndAddSystem(); if (isEmbedded()) { health.setEnabled(false); } } */ }
private TaskManager getTaskManager() { if (_taskManager == null) { AmpSystem ampSystem = AmpSystem.getCurrent(); if (ampSystem != null) { //_taskManager = ampSystem.getTaskManager(); throw new UnsupportedOperationException(); } if (_taskManager == null) { throw new UnsupportedOperationException(L.l("Task manager is not available in this context")); } } return _taskManager; }
public String getAddress() { return _ampSystem.getAddress(); }
ServicesAmp ampManager = _ampSystem.getManager(); SchemeBartenderPodProxy schemeBartenderPodProxy = new SchemeBartenderPodProxy(_bartender, ampManager, null);
AmpSystem.createAndAddSystem(getServerId());
ServiceRefPodRoot(SchemePod podScheme, ServicesAmp manager, PodBartender pod, String address) { _podScheme = podScheme; _manager = manager; _pod = pod; _address = address; _managerSystem = AmpSystem.currentManager(); Objects.requireNonNull(_managerSystem); // _selfService = _manager.service(new Object()); }
/** * Creates the webApp with its environment loader. */ public PodContainer(BartenderSystem bartender, HttpContainerBuilder builder) { Objects.requireNonNull(bartender); Objects.requireNonNull(builder); _bartender = bartender; _ampSystem = AmpSystem.getCurrent(); //_httpContainer = httpContainer; _classLoader = EnvLoader.getEnvironmentClassLoader(); _local.set(this, _classLoader); _lifecycle = new Lifecycle(log, "pod-container"); _ampManager = _ampSystem.getManager(); }
public NetworkSystem(SystemManager systemManager, ServerBartender selfServer, Config config) { Objects.requireNonNull(selfServer); Objects.requireNonNull(config); _selfServer = selfServer; _config = config; ServicesAmp manager = AmpSystem.currentManager(); }
_ampSystem = AmpSystem.getCurrent(); ServicesAmp rampManager = _ampSystem.getManager();
public DeploySystem2(SystemManager systemManager) { Objects.requireNonNull(systemManager); _ampManager = AmpSystem.currentManager(); Objects.requireNonNull(_ampManager); }
FilesSchemeServiceImpl(FileServiceRoot root) { Objects.requireNonNull(root); _root = root; _podMap.put(_root.getPodName(), root); _ampManager = AmpSystem.currentManager(); Objects.requireNonNull(_ampManager); }
public FileServiceBuilder() { _tableManager = KrakenSystem.current().getTableManager(); Objects.requireNonNull(_tableManager); _ampManager = AmpSystem.currentManager(); Objects.requireNonNull(_ampManager); _system = BartenderFileSystem.getCurrent(); Objects.requireNonNull(_system); }
@Override public PodKrakenAmp getPod(String podName) { if (podName == null) { return _podManager; } PodBartender pod = _system.findPod(podName); if (pod == null) { throw new IllegalStateException(L.l("{0} is an unknown pod", podName)); } ServicesAmp rampManager = AmpSystem.currentManager(); return new PodKraken(_tableManager, rampManager, pod); }
public static TempStoreSystem createAndAddSystem() { RootDirectorySystem rootService = RootDirectorySystem.getCurrent(); if (rootService == null) throw new IllegalStateException(L.l("{0} requires an active {1}", TempStoreSystem.class.getSimpleName(), RootDirectorySystem.class.getSimpleName())); Path dataDirectory = rootService.dataDirectory(); ServicesAmp ampManager = AmpSystem.currentManager(); Objects.requireNonNull(ampManager); TempFileManager manager = new TempFileManager(dataDirectory.resolve("tmp"), ampManager); return createAndAddSystem(manager); }