Skip to content

Commit

Permalink
refactor: Use AtomicInteger#get() instead of intValue.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev committed Aug 18, 2016
1 parent d5dcd95 commit 246ce4e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
12 changes: 6 additions & 6 deletions src/main/java/org/jitsi/videobridge/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -716,18 +716,18 @@ else if (t instanceof ThreadDeath)
durationSeconds);

videobridgeStatistics.totalNoPayloadChannels.addAndGet(
statistics.totalNoPayloadChannels.intValue());
statistics.totalNoPayloadChannels.get());
videobridgeStatistics.totalNoTransportChannels.addAndGet(
statistics.totalNoTransportChannels.intValue());
statistics.totalNoTransportChannels.get());

videobridgeStatistics.totalChannels.addAndGet(
statistics.totalChannels.intValue());
statistics.totalChannels.get());

boolean hasFailed
= statistics.totalNoPayloadChannels.intValue()
>= statistics.totalChannels.intValue();
= statistics.totalNoPayloadChannels.get()
>= statistics.totalChannels.get();
boolean hasPartiallyFailed
= statistics.totalNoPayloadChannels.intValue() != 0;
= statistics.totalNoPayloadChannels.get() != 0;

if (hasPartiallyFailed)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,21 +361,19 @@ protected void generate0()
{
Videobridge.Statistics jvbStats = videobridge.getStatistics();
totalConferencesCreated
+= jvbStats.totalConferencesCreated.intValue();
+= jvbStats.totalConferencesCreated.get();
totalConferencesCompleted
+= jvbStats.totalConferencesCompleted.intValue();
+= jvbStats.totalConferencesCompleted.get();
totalConferenceSeconds
+= jvbStats.totalConferenceSeconds.intValue();
+= jvbStats.totalConferenceSeconds.get();
totalFailedConferences
+= jvbStats.totalFailedConferences.intValue();
+= jvbStats.totalFailedConferences.get();
totalPartiallyFailedConferences
+= jvbStats.totalPartiallyFailedConferences.intValue();
+= jvbStats.totalPartiallyFailedConferences.get();
totalNoTransportChannels
+= jvbStats.totalNoTransportChannels.intValue();
totalNoPayloadChannels
+= jvbStats.totalNoPayloadChannels.intValue();
totalChannels
+= jvbStats.totalChannels.intValue();
+= jvbStats.totalNoTransportChannels.get();
totalNoPayloadChannels += jvbStats.totalNoPayloadChannels.get();
totalChannels += jvbStats.totalChannels.get();

for (Conference conference : videobridge.getConferences())
{
Expand Down

0 comments on commit 246ce4e

Please sign in to comment.