Permalink
Browse files

Corrected signature for @SystemInformation (ENG-1643) - For the C# li…

…brary, backward compatibility is kept and the extra parameter is left as optional through signature overload.
  • Loading branch information...
1 parent 1101b42 commit a05f5570d5e6c010090106cbb1d89644f08f2739 Seb Coursol committed Aug 23, 2011
@@ -161,7 +161,18 @@ public Response<Table[]> Statistics(ServerStatistics component, bool isInterval)
/// connection points.</returns>
public Response<Table[]> SystemInformation()
{
- return this.Executor.Execute<Table[]>(Timeout.Infinite, "@SystemInformation");
+ return this.SystemInformation(ServerSysInfoSelector.OVERVIEW);
+ }
+
+ /// <summary>
+ /// Returns system information for each node of the database cluster.
+ /// </summary>
+ /// <param name="selector">The System Information item to retrieve (Overview or Deployment)</param>
+ /// <returns>Table containing the basic system information for each node in the cluster to which this
+ /// connection points.</returns>
+ public Response<Table[]> SystemInformation(ServerSysInfoSelector selector)
+ {
+ return this.Executor.Execute<Table[]>(Timeout.Infinite, "@SystemInformation", selector.ToString().ToUpper());
}
/// <summary>
@@ -0,0 +1,38 @@
+/*
+
+ This file is part of VoltDB.
+ Copyright (C) 2008-2011 VoltDB Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
+ persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+namespace VoltDB.Data.Client
+{
+ /// <summary>
+ /// Enumeration of available system statistics that can be queried by the @Statistics system procedure.
+ /// </summary>
+ public enum ServerSysInfoSelector : byte
+ {
+ /// <summary>
+ /// Overview.
+ /// </summary>
+ OVERVIEW = 1,
+
+ /// <summary>
+ /// Deployment Details.
+ /// </summary>
+ DEPLOYMENT = 2
+ }
+}
@@ -151,6 +151,7 @@
<Compile Include="Connections\ProcedureWrapper[TResult,T1,...,T9].cs">
<DependentUpon>ProcedureWrapper[T].tt</DependentUpon>
</Compile>
+ <Compile Include="Enums\ServerSysInfoSelector.cs" />
<Compile Include="Properties\CommonAssemblyInfo.cs" />
<Compile Include="Connections\AdhocAccess.cs" />
<Compile Include="Connections\InfoAccess.cs" />

0 comments on commit a05f557

Please sign in to comment.