Codota Logo
ProtobufSystemInfo$Attribute.getLongValue
Code IndexAdd Codota to your IDE (free)

How to use
getLongValue
method
in
org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo$Attribute

Best Java code snippets using org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo$Attribute.getLongValue (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: SonarSource/sonarqube

 public static void assertThatAttributeIs(ProtobufSystemInfo.Section section, String key, long expectedValue) {
  ProtobufSystemInfo.Attribute value = attribute(section, key);
  assertThat(value).as(key).isNotNull();
  assertThat(value.getLongValue()).isEqualTo(expectedValue);
 }
}
origin: SonarSource/sonarqube

@Test
public void export_system_info() {
 ProtobufSystemInfo.Section section = underTest.toProtobuf();
 assertThat(section.getName()).isEqualTo("Compute Engine Database Connection");
 assertThat(section.getAttributesCount()).isEqualTo(9);
 assertThat(section.getAttributes(0).getKey()).isEqualTo("Pool Initial Size");
 assertThat(section.getAttributes(0).getLongValue()).isGreaterThanOrEqualTo(0);
}
origin: SonarSource/sonarqube

@Test
public void pool_info() {
 ProtobufSystemInfo.Section section = underTest.toProtobuf();
 assertThat(attribute(section, "Pool Max Connections").getLongValue()).isGreaterThan(0L);
 assertThat(attribute(section, "Pool Idle Connections").getLongValue()).isGreaterThanOrEqualTo(0L);
 assertThat(attribute(section, "Pool Min Idle Connections").getLongValue()).isGreaterThanOrEqualTo(0L);
 assertThat(attribute(section, "Pool Max Idle Connections").getLongValue()).isGreaterThanOrEqualTo(0L);
 assertThat(attribute(section, "Pool Max Wait (ms)")).isNotNull();
 assertThat(attribute(section, "Pool Remove Abandoned")).isNotNull();
 assertThat(attribute(section, "Pool Remove Abandoned Timeout (seconds)").getLongValue()).isGreaterThanOrEqualTo(0L);
}
origin: SonarSource/sonarqube

 @Test
 public void return_nb_of_processors() {
  ProtobufSystemInfo.Section protobuf = underTest.toProtobuf();
  assertThat(attribute(protobuf, "Processors").getLongValue()).isGreaterThan(0);
 }
}
origin: SonarSource/sonarqube

@Test
public void index_attributes() {
 ProtobufSystemInfo.Section section = underTest.toProtobuf();
 // one index "issues"
 assertThat(attribute(section, "Index issues - Docs").getLongValue()).isEqualTo(0L);
 assertThat(attribute(section, "Index issues - Shards").getLongValue()).isGreaterThan(0);
 assertThat(attribute(section, "Index issues - Store Size").getStringValue()).isNotNull();
}
origin: SonarSource/sonarqube

 @Test
 public void test_attributes() {
  ProtobufSystemInfo.Section section = underTest.toProtobuf();
  assertThat(attribute(section, "Nodes").getLongValue()).isGreaterThan(0);
  assertThat(attribute(section, "State").getStringValue()).isIn("RED", "YELLOW", "GREEN");
 }
}
origin: SonarSource/sonarqube

@Test
public void return_nb_of_processors() {
 ProtobufSystemInfo.Section section = underTest.toProtobuf();
 assertThat(attribute(section, "Processors").getLongValue()).isGreaterThan(0);
}
origin: SonarSource/sonarqube

private void writeAttribute(ProtobufSystemInfo.Attribute attribute, JsonWriter json) {
 switch (attribute.getValueCase()) {
  case BOOLEAN_VALUE:
   json.prop(attribute.getKey(), attribute.getBooleanValue());
   break;
  case LONG_VALUE:
   json.prop(attribute.getKey(), attribute.getLongValue());
   break;
  case DOUBLE_VALUE:
   json.prop(attribute.getKey(), attribute.getDoubleValue());
   break;
  case STRING_VALUE:
   json.prop(attribute.getKey(), attribute.getStringValue());
   break;
  case VALUE_NOT_SET:
   json.name(attribute.getKey()).beginArray().values(attribute.getStringValuesList()).endArray();
   break;
  default:
   throw new IllegalArgumentException("Unsupported type: " + attribute.getValueCase());
 }
}
origin: org.sonarsource.sonarqube/sonar-server

private void writeAttribute(ProtobufSystemInfo.Attribute attribute, JsonWriter json) {
 switch (attribute.getValueCase()) {
  case BOOLEAN_VALUE:
   json.prop(attribute.getKey(), attribute.getBooleanValue());
   break;
  case LONG_VALUE:
   json.prop(attribute.getKey(), attribute.getLongValue());
   break;
  case DOUBLE_VALUE:
   json.prop(attribute.getKey(), attribute.getDoubleValue());
   break;
  case STRING_VALUE:
   json.prop(attribute.getKey(), attribute.getStringValue());
   break;
  case VALUE_NOT_SET:
   json.name(attribute.getKey()).beginArray().values(attribute.getStringValuesList()).endArray();
   break;
  default:
   throw new IllegalArgumentException("Unsupported type: " + attribute.getValueCase());
 }
}
org.sonar.process.systeminfo.protobufProtobufSystemInfo$AttributegetLongValue

Popular methods of ProtobufSystemInfo$Attribute

  • getBooleanValue
  • getKey
  • getStringValue
  • getDoubleValue
  • getStringValuesList
  • getValueCase
  • newBuilder

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now