Example usage for org.springframework.boot.jdbc.metadata DataSourcePoolMetadata getUsage

List of usage examples for org.springframework.boot.jdbc.metadata DataSourcePoolMetadata getUsage

Introduction

In this page you can find the example usage for org.springframework.boot.jdbc.metadata DataSourcePoolMetadata getUsage.

Prototype

Float getUsage();

Source Link

Document

Return the usage of the pool as value between 0 and 1 (or -1 if the pool is not limited).

Usage

From source file:org.springframework.boot.jdbc.metadata.CommonsDbcp2DataSourcePoolMetadataTests.java

@Test
public void getPoolUsageWithUnlimitedPool() {
    DataSourcePoolMetadata unlimitedDataSource = createDataSourceMetadata(0, -1);
    assertThat(unlimitedDataSource.getUsage()).isEqualTo(Float.valueOf(-1F));
}