method2testcases stringlengths 118 6.63k |
|---|
### Question:
PathMatchers { @Factory public static Matcher<Path> isDirectory() { return new IsDirectory(); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> h... |
### Question:
HasCookieMatcher extends TypeSafeMatcher<WebDriver> { @Factory public static Matcher<WebDriver> hasCookie(String name) { return new HasCookieMatcher(name); } protected HasCookieMatcher(String name); @Override void describeTo(Description description); @Factory static Matcher<WebDriver> hasCookie(String na... |
### Question:
Telemetry { public synchronized static Telemetry getInstance() { if (sTelemetryInstance == null) { new Builder().build(); } return sTelemetryInstance; } private Telemetry(final Builder builder); synchronized static Telemetry getInstance(); void addObserver(@SuppressWarnings(WarningType.rawtype_warning) f... |
### Question:
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpCo... |
### Question:
Optionality { public static boolean is_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; return (odt.inner_type() == inner); } private Optionality(); static boo... |
### Question:
Optionality { public static boolean is_deep_optional_of(DataType opt, DataType inner) { Ensure.not_null(opt); Ensure.not_null(inner); if (!(opt instanceof OptionalDataType)) { return false; } OptionalDataType odt = (OptionalDataType) opt; if (odt.inner_type() == inner) { return true; } return is_deep_opti... |
### Question:
FileTemplateSetLoader extends TemplateSetLoader { @Override public TemplateSet load() throws IOException { Metadata metadata = loadMetadata(); Map<String, Template> templates = new HashMap<>(); for (String file : metadata.getTemplates()) { templates.put(file, loadTemplate(file)); } try { templates.put(FIL... |
### Question:
AllSuperTypes { public static Set<DataType> run(DataType t, boolean itself) { Ensure.not_null(t); Set<DataType> pending = new HashSet<>(); pending.add(t); Set<DataType> result = new HashSet<>(); if (itself) { result.add(t); } while (pending.size() > 0) { DataType dt = pending.iterator().next(); pending.re... |
### Question:
CommonLowerSuperTypes { public static Set<DataType> run(DataType t1, DataType t2, boolean include_base) { Ensure.not_null(t1); Ensure.not_null(t2); Set<DataType> super_1 = AllSuperTypes.run(t1, include_base); Set<DataType> super_2 = AllSuperTypes.run(t2, include_base); Set<DataType> common = new HashSet<>... |
### Question:
ApplicationCore { public void startup(String filename) throws Exception { sysConfig = new SystemConfiguration(filename); try { startBackground(); } catch (Exception e) { throw e; } registerWidgets(); } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void ... |
### Question:
TypeScope extends Scope<NamedType> { public DataType type(String name) throws AmbiguousNameException { NamedType nt = find(name); if (nt == null) { return null; } return nt.type(); } TypeScope(); DataType type(String name); }### Answer:
@Test public void create_find_types() throws Exception { TypeScope t... |
### Question:
ValueScope extends Scope<NamedValue> { public DataValue value(String name) throws AmbiguousNameException { Ensure.not_null(name, "name == null"); NamedValue nv = find(name); if (nv == null) { return null; } return nv.value(); } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String nam... |
### Question:
ValueScope extends Scope<NamedValue> { public TypeScope typed_scope() { return m_types; } ValueScope(TypeScope types); TypeScope typed_scope(); DataType type(String name); DataValue value(String name); }### Answer:
@Test public void obtain_typed_scope() throws Exception { assertEquals(m_ts, m_vs.typed_sc... |
### Question:
ListDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Overr... |
### Question:
ListDataType extends CollectionDataType { @Override public ListDataValue make() { return new ListDataValue(this); } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataVal... |
### Question:
ApplicationCore { public void attach() { if (!attached) { try { runtimeAgg.start(); attached = true; if (CREATE_MOCK_RAINBOW) { mockRainbow.run(); } } catch (RuntimeAggregatorException ex) { Logger.getLogger(ApplicationCore.class.getName()).log(Level.SEVERE, "Cannot attach to the Rainbow system.", ex); } ... |
### Question:
ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_lis... |
### Question:
BagDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(); @Override bo... |
### Question:
BagDataType extends CollectionDataType { @Override public BagDataValue make() { return new BagDataValue(this); } BagDataType(DataType inner_type, AnyType any); static final String build_bag_name(DataType inner); static BagDataType bag_of(DataType inner, PrimitiveScope pscope); @Override BagDataValue make(... |
### Question:
BagDataType extends CollectionDataType { public static BagDataType bag_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_bag_na... |
### Question:
ApplicationCore { public void detach() { if (attached) { runtimeAgg.stop(); attached = false; if (CREATE_MOCK_RAINBOW) { mockRainbow.cancel(); } } } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); Ar... |
### Question:
SetDataType extends CollectionDataType { @Override public boolean is_abstract() { return false; } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override bo... |
### Question:
SetDataType extends CollectionDataType { @Override public SetDataValue make() { return new SetDataValue(this); } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(... |
### Question:
SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_na... |
### Question:
HierarchicalName { public HierarchicalName make_absolute() { Ensure.is_false(m_is_absolute); return new HierarchicalName(true, m_names); } HierarchicalName(boolean absolute, List<String> names); HierarchicalName(boolean absolute, String... names); boolean absolute(); String peek(); HierarchicalName pop_f... |
### Question:
HierarchicalName { @Override public String toString() { StringBuilder sb = new StringBuilder(); if (m_is_absolute) { sb.append("::"); } for (int i = 0; i < m_names.size(); i++) { if (i > 0) { sb.append("::"); } sb.append(m_names.get(i)); } return sb.toString(); } HierarchicalName(boolean absolute, List<St... |
### Question:
HierarchicalName { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof HierarchicalName)) { return false; } HierarchicalName hn = (HierarchicalName) obj; return hn.m_is_absolute == m_is_absolute && hn.m_names.equals(m_names); } HierarchicalName(boolean absolute, List<String> ... |
### Question:
ApplicationCore { public ArrayList<String> getSessionList() { return databaseCon.getSessionList(); } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String> getSessionList(); boolean isAtta... |
### Question:
Scope { public synchronized final void add(Scope<T> scope) { Ensure.not_null(scope); Ensure.is_null(scope.m_parent); Ensure.not_null(scope.m_name); if (m_objects.get(scope.m_name) != null) { throw new IllegalStateException("Scope already has an object " + "named '" + scope.m_name + "'."); } if (m_sub_scop... |
### Question:
Scope { public synchronized final void link(Scope<T> scope) throws CyclicScopeLinkageException { Ensure.not_null(scope); Ensure.is_false(m_linked.contains(scope)); Set<Scope<T>> current = new HashSet<>(); current.addAll(m_linked); current.add(scope); Set<Scope<T>> seen = new HashSet<>(current); do { curre... |
### Question:
Scope { public synchronized T find(String name) throws AmbiguousNameException { return find(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synchronized final void ... |
### Question:
Scope { public synchronized Scope<T> find_scope(String name) throws AmbiguousNameException { return find_scope(new HierarchicalName(false, name)); } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname(); synchronized final void add(Scope<T> scope); synch... |
### Question:
ApplicationCore { public boolean isAttached() { return attached; } protected ApplicationCore(); static ApplicationCore getInstance(); void startup(String filename); void attach(); void detach(); String getWriteSession(); ArrayList<String> getSessionList(); boolean isAttached(); static void registerWidget... |
### Question:
Scope { public synchronized boolean child_scope_of(Scope<?> scope) { Ensure.not_null(scope); for (Scope<?> p = m_parent; p != null; p = p.m_parent) { if (p == scope) { return true; } } return false; } Scope(String name); final String name(); final Scope<T> parent(); final HierarchicalName absolute_hname()... |
### Question:
SyncScbSlave { public synchronized void sync_now_wait() { int prev_count = m_sync_count; do { sync_now(); try { wait(WAIT_FOR_SYNC_TIME_MS); } catch (InterruptedException e) { } } while (m_sync_count == prev_count); } SyncScbSlave(SyncScbMaster master, long poll_interval_ms); synchronized Date last_sync_d... |
### Question:
RmiServerPublisher { public static int publish_service(Class<?> cls, Object obj) throws RmiCommException { return publish_service(cls, obj, 0); } static int publish_service(Class<?> cls, Object obj); static int publish_service(Class<?> cls, Object obj, int port); static void shutdown_all(); }### Answer:... |
### Question:
AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.c... |
### Question:
RmiClientDiscovery { public static void find_open_ports(String host, int min_port, int max_port, PortFoundListener listener, PortScanListener scan_listener) { if (host == null) { throw new IllegalArgumentException("host == null"); } if (listener == null) { throw new IllegalArgumentException("listener == n... |
### Question:
WorkerThreadGroup implements WorkerThreadGroupCI { public synchronized void add_subgroup(WorkerThreadGroup wtg) { Ensure.not_null(wtg, "wtg == null"); Ensure.is_true(wtg != this, "wtg == this"); Ensure.is_false(m_subgroups.contains(wtg), "m_subgroups.contains(wtg)"); Ensure.is_false(wtg.all_subgroups().co... |
### Question:
WorkerThread implements WorkerThreadCI { @Override public final synchronized void stop() { Ensure.is_true(m_state == WtState.RUNNING, "w_state != WtState.RUNNING"); if (Thread.currentThread() == m_thread) { throw new ClosingWorkerThreadFromWithinException(); } m_state = WtState.STOPPING; fire_state_change... |
### Question:
WorkerThread implements WorkerThreadCI { @Override public String name() { return m_name; } WorkerThread(String name); void add_listener(WorkerThreadListener l); void remove_listener(WorkerThreadListener l); @Override String name(); @Override synchronized String description(); @Override synchronized Throwa... |
### Question:
AcmeGraph extends AcmeModelView { public IAcmeSystem getCurrentSystem() { return currentSystem; } AcmeGraph(AbstractRainbowVaadinUI ui); IAcmeSystem getCurrentSystem(); void setCurrentSystem(IAcmeSystem system); void resetGraph(); }### Answer:
@Test public void testRootComponent() throws Exception { Syst... |
### Question:
CloseableWorkerThread extends WorkerThread implements Closeable { @Override public synchronized void close() throws IOException { if (m_closeable == null) { return; } T t = m_closeable; m_closeable = null; if (state() == WtState.RUNNING) { thread().interrupt(); } try { t.close(); } finally { m_dispatcher.... |
### Question:
CloseableWorkerThread extends WorkerThread implements Closeable { public synchronized boolean closed() { return m_closeable == null; } CloseableWorkerThread(String name, T closeable,
boolean close_on_abort); synchronized void add_listener(CloseableListener l); synchronized void remove_listener(Closeabl... |
### Question:
DirectoryReader { public static Set<File> listAllRecursively(File directory) { Ensure.not_null(directory, "directory == null"); Ensure.is_true(directory.isDirectory(), "file is not a directory"); Set<File> result = new HashSet<>(); File[] files = directory.listFiles(); for (File f : files) { if (f.isDirec... |
### Question:
EventFilter implements EventSink { public synchronized void connect(EventSink s) { Ensure.is_true(m_sink == null || s == null); Ensure.is_null(m_lock); m_sink = s; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Ob... |
### Question:
AcmeModelView extends CustomComponent implements IUpdatableWidget { @Override public void update() { model = (IAcmeSystem) systemViewProvider.getView().getModelInstance(); if (isModelChanged()) { subUpdate(); } } AcmeModelView(ISystemViewProvider svp); @Override void update(); @Override boolean isActive()... |
### Question:
EventFilter implements EventSink { public EventFilterInfo info() { return new EventFilterInfo(this); } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Object l); synchronized boole... |
### Question:
EventFilter implements EventSink { protected void forward(BusData data) throws IOException { Ensure.not_null(data); EventSink sink; synchronized (this) { sink = m_sink; } if (sink != null) { sink.sink(data); } } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); Eve... |
### Question:
EventFilter implements EventSink { public synchronized void lock(Object l) { Ensure.not_null(l); Ensure.is_null(m_lock); m_lock = l; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlo... |
### Question:
EventFilter implements EventSink { public synchronized void unlock(Object l) { Ensure.not_null(l); Ensure.equals(m_lock, l); m_lock = null; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized vo... |
### Question:
BlockUnblockFilter extends
StateBasedBlockerFilter<BlockedUnblockedState> { public void unblock() { state(BlockedUnblockedState.UNBLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }### Answer:
@Test public void can_unblock_unblocked() throws Exception { assertEq... |
### Question:
BlockUnblockFilter extends
StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }### Answer:
@Test public void can_block_blocked() throws Exception { m_buf.block(); a... |
### Question:
AcmeSystemViewProvider implements ISystemViewProvider { @Override public boolean isCurrent() { return this.isCurrent; } protected AcmeSystemViewProvider(
IRuntimeAggregator<IAcmeSystem> runtimeAggregator,
AbstractRainbowVaadinUI ui, ISystemConfiguration systemConfig,
I... |
### Question:
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(Even... |
### Question:
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f)... |
### Question:
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> fil... |
### Question:
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev... |
### Question:
AcmeSystemViewProvider implements ISystemViewProvider { public DataValue getValue(String mapping) throws AcmeConversionException { IAcmeProperty property = (IAcmeProperty) ModelHelper .getElementFromQualifiedName(internalModel.getModelInstance(), mapping); return AcmeConverterSupport.convertToDataValue(pr... |
### Question:
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); @Override void sink(BusData data); }### Answer:
@Test public void sink_data_is_written_to... |
### Question:
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); @Override void sink(BusData data); }### Answer:
@Test public void sink() throws Exception { BusDataQueueGroupImpl qg = new BusD... |
### Question:
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T p... |
### Question:
Dashboard extends VerticalLayout { public void addPage(String pageName) { final HorizontalLayout newLayout = new HorizontalLayout(); DragAndDropWrapper layoutWrapper = new DragAndDropWrapper(newLayout); setDropHandler(newLayout, layoutWrapper); tabs.add(layoutWrapper); pageContentArea.addTab(layoutWrapper... |
### Question:
ServerEnablementGauge extends RegularPatternGauge { private AcmeModelInstance getModel () { if (m_model == null) { m_model = (AcmeModelInstance) m_modelsPort.<IAcmeSystem>getModelInstance (new ModelReference (m_modelDesc .getName (), m_modelDesc.getType ())); } return m_model; } ServerEnablementGauge(Stri... |
### Question:
Dashboard extends VerticalLayout { public void removePage(int pageId) { for (int i = 0; i < pageWidgets.get(pageId).size(); i++) { viewControl.removeWidget(pageWidgets.get(pageId).get(i)); } pageWidgets.remove(pageId); pageContentArea.removeTab(pageContentArea.getTab(pageContentArea .getSelectedTab())); t... |
### Question:
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); void addPage(String pageName); void setPage(int pageId); void removePage(int pageId); void loadViewConfiguration(); void saveViewConfiguration(); void rese... |
### Question:
TimelineView extends CustomComponent implements IUpdatableWidget { boolean isCurrent() { return this.currentCheckBox.getValue(); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider,
Class<? extends Timeline> tlClass); @Override void upd... |
### Question:
TimelineView extends CustomComponent implements IUpdatableWidget { public void setTimeDisplay(Date date) { this.timeDisplay.setValue(date); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider,
Class<? extends Timeline> tlClass); @Overri... |
### Question:
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> getInternalModel() { return internalModel; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config,
IDatabaseConnector dbConn); @Over... |
### Question:
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> copyInternalModel() throws RainbowCopyException { synchronized (copyLock) { return internalModel.copyModelInstance("Acme"); } } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAg... |
### Question:
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IEventBuffer getEventBuffer() { return eventBuffer; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config,
IDatabaseConnector dbConn); @Override void start(); ... |
### Question:
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); S... |
### Question:
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override synchronized public void processEvent(String channel, IRainbowMessage event) throws EventProcessingException { if (!isRunning) { return; } switch (channel) { case "MODEL_CHANGE": processModelUpdate(event); break; case "MODEL_DS":... |
### Question:
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeR... |
### Question:
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { protected void processStreamingEvent(String channel, IRainbowMessage event) { eventBuffer.add(event); databaseConnector.writeEvent(channel, event, getEventTimestamp(event)); } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntim... |
### Question:
EventBuffer implements IEventBuffer { @Override public int drainToCollection(Collection<IRainbowMessage> collection) { return queue.drainTo(collection); } EventBuffer(int size); @Override int drainToCollection(Collection<IRainbowMessage> collection); @Override void add(IRainbowMessage event); @Override vo... |
### Question:
EventBuffer implements IEventBuffer { @Override public void add(IRainbowMessage event) { if (isActive) { if (!queue.offer(event)) { Logger.getLogger(EventBuffer.class.getName()).warning( "Cannot add an event. The buffer is full."); } } } EventBuffer(int size); @Override int drainToCollection(Collection<IR... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public String getRainbowHost() { String prop = getProperty("rainbow.host"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Overri... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public short getRainbowPort() { String prop = getProperty("rainbow.port"); return Short.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public String getModelPath() { String prop = getProperty("ingestion.model.path"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public String getNode() { String prop = getProperty("storage.cassandra.node"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Ove... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public boolean isAttached() { String prop = getProperty("ingestion.attach.onstartup"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainb... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setAttached(boolean attached) { setProperty("ingestion.attach.onstartup", Boolean.toString(attached)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbow... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setRainbowHost(String host) { setProperty("rainbow.host", host); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short get... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setRainbowPort(short port) { setProperty("rainbow.port", Short.toString(port)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Ove... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setModelPath(String path) { setProperty("ingestion.model.path", path); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override sho... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setNode(String node) { setProperty("storage.cassandra.node", node); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public String getConfigDir() { return configDir; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @Override voi... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setConfigDir(String path) { configDir = path; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @Ove... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public int getSnapshotRate() { String prop = getProperty("ingestion.snapshot.rate"); return Integer.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbow... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setSnapshotRate(int rate) { setProperty("ingestion.snapshot.rate", Integer.toString(rate)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public boolean isModelLocal() { String prop = getProperty("ingestion.model.local", "false"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void se... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setModelLocal(boolean local) { setProperty("ingestion.model.local", Boolean.toString(local)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(Stri... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public String getModelName() { return getProperty("ingestion.model.name"); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRa... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setModelName(String name) { setProperty("ingestion.model.name", name); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override sho... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public String getModelFactoryClass() { return getProperty("ingestion.model.factory"); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override ... |
### Question:
SystemConfiguration extends Properties implements
ISystemConfiguration { @Override public void setModelFactoryClass(String cls) { setProperty("ingestion.model.factory", cls); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Ove... |
### Question:
HistoryProvider implements IHistoryProvider { @Override public IModelInstance<?> getModelState(Date time) { Logger.getLogger(HistoryProvider.class.getName()).log( Level.INFO, "Model Requested for time: {0}", time.toString()); Pair<Date, IModelInstance<?>> modelraw = databaseconn .getLatestSnapshot(time); ... |
### Question:
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector... |
### Question:
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRangeByType(String channel, Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRangeByType( channel, startTime, endTime); return model;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.