public RamChartUpdater(JavaServer server, PointShapeLine graph) { Timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(2) }; Timer.Tick += timer_Tick; Timer.Start(); Server = server; Graph = graph; }
/// <summary> /// Starts the client. /// </summary> private static IIgniteClient StartClient() { var cfg = new IgniteClientConfiguration(JavaServer.GetClientConfiguration()) { Logger = new ListLogger(new ConsoleLogger { MinLevel = LogLevel.Trace }), EnablePartitionAwareness = true }; return(Ignition.StartClient(cfg)); }
public void TestReconnectToOldNodeDisablesPartitionAwareness() { IIgniteClient client = null; var clientConfiguration = new IgniteClientConfiguration(JavaServer.GetClientConfiguration()) { EnablePartitionAwareness = true, Logger = new ListLogger(new ConsoleLogger { MinLevel = LogLevel.Trace }) }; try { using (StartNewServer()) { client = Ignition.StartClient(clientConfiguration); var cache = client.GetOrCreateCache <int, int>(TestContext.CurrentContext.Test.Name); cache.Put(1, 42); Assert.AreEqual(42, cache.Get(1)); Assert.IsTrue(client.GetConfiguration().EnablePartitionAwareness); } Assert.Catch(() => client.GetCacheNames()); using (StartOldServer()) { var cache = client.GetOrCreateCache <int, int>(TestContext.CurrentContext.Test.Name); cache.Put(1, 42); Assert.AreEqual(42, cache.Get(1)); Assert.IsFalse(client.GetConfiguration().EnablePartitionAwareness); var log = ((ListLogger)client.GetConfiguration().Logger).Entries .FirstOrDefault(e => e.Message.StartsWith("Partition")); Assert.IsNotNull(log); Assert.AreEqual("Partition awareness has been disabled: " + "server protocol version 1.0.0 is lower than required 1.4.0", log.Message); } } finally { if (client != null) { client.Dispose(); } } }
public MainWindow() { InitializeComponent(); DataContext = JavaServer; ConfigHandler.Create(); ConfigHandler.Load(); Settings.Load(); JavaServer = new JavaServer(inputXMS.Text, inputXMX.Text); OutputHandler.Log("Ready for launch!"); if (Settings.AutoStart) { JavaServer.Start(); } if (Settings.Debug) { Debug = true; } }
public async Task GlobalSetup() { _javaServer = await JavaServer.StartAsync(); _client = await IgniteClient.StartAsync(new IgniteClientConfiguration("127.0.0.1:" + _javaServer.Port)); _table = (await _client.Tables.GetTableAsync("PUB.tbl1")) !.RecordBinaryView; var tuple = new IgniteTuple { ["key"] = 1, ["val"] = "foo" }; await _table.UpsertAsync(null, tuple); _keyTuple = new IgniteTuple { ["key"] = 1 }; }
private void ConsoleInputBox_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (ConsoleInputBox.Text.ToLower().Equals("start")) { try { JavaServer = new JavaServer(inputXMS.Text, inputXMX.Text); JavaServer.Start(); } catch (NullReferenceException ex) { OutputHandler.Log(ex.ToString(), Level.ERROR); } } else if (ConsoleInputBox.Text.ToLower().Equals("stop")) { JavaServer.Stop(); } else if (ConsoleInputBox.Text.ToLower().Equals("restart")) { try { JavaServer.Stop(); JavaServer = new JavaServer(inputXMS.Text, inputXMX.Text); JavaServer.Start(); } catch (NullReferenceException ex) { OutputHandler.Log(ex.ToString(), Level.ERROR); } } else { JavaServer.Input(ConsoleInputBox.Text); } ConsoleInputBox.Text = ""; } }
public void FixtureSetUp() { _server = JavaServer.Start(_groupId, _serverVersion); }
public void FixtureSetUp() { _server = JavaServer.Start(_igniteVersion); }
/// <summary> /// Starts old server node (partition awareness is not supported). /// </summary> private static IDisposable StartOldServer() { return(JavaServer.Start(JavaServer.GroupIdIgnite, "2.4.0")); }
/// <summary> /// Starts old server node (partition awareness is not supported). /// </summary> private static IDisposable StartOldServer() { return(JavaServer.Start("2.4.0")); }