Skip to content

Commit

Permalink
Minor sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 committed Mar 7, 2024
1 parent c38f64c commit c91bd1c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,21 @@ public long[] getValues(VisualVMModel model)

public static TracerProbeDescriptor createDescriptor(boolean available)
{
return new TracerProbeDescriptor(Localization.getLocalText("LBL_total_members"),
return new TracerProbeDescriptor(Localization.getLocalText(LBL),
Localization.getLocalText("LBL_members_desc"), ICON, 5, available);
}

private static ProbeItemDescriptor[] createItemDescriptors()
{
return new ProbeItemDescriptor[]
{
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText("LBL_total_members"),
getMonitorsString("LBL_total_members"), ItemValueFormatter.DEFAULT_DECIMAL,
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_DECIMAL,
1d, 0, 1),
};
}

// ----- constants ------------------------------------------------------

private static final String LBL = "LBL_total_members";
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,22 @@ public long[] getValues(VisualVMModel model)

public static TracerProbeDescriptor createDescriptor(boolean available)
{
return new TracerProbeDescriptor(Localization.getLocalText("LBL_member_departure_count"),
return new TracerProbeDescriptor(Localization.getLocalText(LBL),
Localization.getLocalText("LBL_departure_count"), ICON, 10, available);
}

private static ProbeItemDescriptor[] createItemDescriptors()
{
return new ProbeItemDescriptor[]
{
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText("LBL_member_departure_count"),
getMonitorsString("LBL_member_departure_count"), ItemValueFormatter.DEFAULT_DECIMAL,
ProbeItemDescriptor.continuousLineFillItem(Localization.getLocalText(LBL),
getMonitorsString(LBL), ItemValueFormatter.DEFAULT_DECIMAL,
1d, 0, 1),
};
}


// ----- constants ------------------------------------------------------

private static final String LBL = "LBL_member_departure_count";
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.oracle.coherence.plugin.visualvm.Localization;
import com.oracle.coherence.plugin.visualvm.VisualVMModel;

import com.oracle.coherence.plugin.visualvm.tablemodel.model.RamJournalData;
import com.oracle.coherence.plugin.visualvm.tablemodel.model.AbstractElasticData;

import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;

Expand Down Expand Up @@ -56,8 +56,8 @@ public FlashJournalFilesProbe(MonitoredDataResolver resolver)
@Override
public long[] getValues(VisualVMModel model)
{
long nRamJournalFileCount = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, RamJournalData.FILE_COUNT, ZERO_VALUES1)[0];
long nRamJournaMaxFiles = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, RamJournalData.MAX_FILES, ZERO_VALUES1)[0];
long nRamJournalFileCount = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, AbstractElasticData.FILE_COUNT, ZERO_VALUES1)[0];
long nRamJournaMaxFiles = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, AbstractElasticData.MAX_FILES, ZERO_VALUES1)[0];
return new long[] {nRamJournalFileCount, nRamJournaMaxFiles};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.oracle.coherence.plugin.visualvm.Localization;
import com.oracle.coherence.plugin.visualvm.VisualVMModel;

import com.oracle.coherence.plugin.visualvm.tablemodel.model.RamJournalData;
import com.oracle.coherence.plugin.visualvm.tablemodel.model.AbstractElasticData;

import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;

Expand Down Expand Up @@ -56,8 +56,8 @@ public FlashJournalSpaceProbe(MonitoredDataResolver resolver)
@Override
public long[] getValues(VisualVMModel model)
{
long nRamJournalCommitted = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, RamJournalData.TOTAL_COMMITTED_BYTES, ZERO_VALUES1)[0];
long nRamJournalUsed = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, RamJournalData.TOTAL_DATA_SIZE, ZERO_VALUES1)[0];
long nRamJournalCommitted = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, AbstractElasticData.TOTAL_COMMITTED_BYTES, ZERO_VALUES1)[0];
long nRamJournalUsed = getSingValueSum(model, VisualVMModel.DataType.FLASHJOURNAL, AbstractElasticData.TOTAL_DATA_SIZE, ZERO_VALUES1)[0];
return new long[] {nRamJournalCommitted, nRamJournalUsed};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.oracle.coherence.plugin.visualvm.Localization;
import com.oracle.coherence.plugin.visualvm.VisualVMModel;

import com.oracle.coherence.plugin.visualvm.tablemodel.model.RamJournalData;
import com.oracle.coherence.plugin.visualvm.tablemodel.model.AbstractElasticData;

import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;

Expand Down Expand Up @@ -56,8 +56,8 @@ public RamJournalFilesProbe(MonitoredDataResolver resolver)
@Override
public long[] getValues(VisualVMModel model)
{
long nRamJournalFileCount = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, RamJournalData.FILE_COUNT, ZERO_VALUES1)[0];
long nRamJournaMaxFiles = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, RamJournalData.MAX_FILES, ZERO_VALUES1)[0];
long nRamJournalFileCount = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, AbstractElasticData.FILE_COUNT, ZERO_VALUES1)[0];
long nRamJournaMaxFiles = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, AbstractElasticData.MAX_FILES, ZERO_VALUES1)[0];
return new long[] {nRamJournalFileCount, nRamJournaMaxFiles};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.oracle.coherence.plugin.visualvm.Localization;
import com.oracle.coherence.plugin.visualvm.VisualVMModel;

import com.oracle.coherence.plugin.visualvm.tablemodel.model.RamJournalData;
import com.oracle.coherence.plugin.visualvm.tablemodel.model.AbstractElasticData;

import com.oracle.coherence.plugin.visualvm.tracer.AbstractCoherenceMonitorProbe;

Expand Down Expand Up @@ -56,8 +56,8 @@ public RamJournalMemoryProbe(MonitoredDataResolver resolver)
@Override
public long[] getValues(VisualVMModel model)
{
long nRamJournalCommitted = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, RamJournalData.TOTAL_COMMITTED_BYTES, ZERO_VALUES1)[0];
long nRamJournalUsed = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, RamJournalData.TOTAL_DATA_SIZE, ZERO_VALUES1)[0];
long nRamJournalCommitted = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, AbstractElasticData.TOTAL_COMMITTED_BYTES, ZERO_VALUES1)[0];
long nRamJournalUsed = getSingValueSum(model, VisualVMModel.DataType.RAMJOURNAL, AbstractElasticData.TOTAL_DATA_SIZE, ZERO_VALUES1)[0];
return new long[] {nRamJournalCommitted, nRamJournalUsed};
}

Expand Down

0 comments on commit c91bd1c

Please sign in to comment.