Move null check from getTotalMemory() 95/37495/2
authorRobert Varga <rovarga@cisco.com>
Tue, 12 Apr 2016 14:16:41 +0000 (16:16 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 12 Apr 2016 20:42:30 +0000 (20:42 +0000)
commitb8c6400766f7324dd57d059bd48e435569fe1a27
tree4e2b04cadef5c15875e96161446d63a44321abfd
parentb30c169bfb4e94d7a519be55dd1f97ccdec5327c
Move null check from getTotalMemory()

This patch converts the interface so it uses a specialized LongSupplier,
which prevents autoboxing. It defines a default retriever, which returns
the memory returned from the JVM, which is used instead of a conditional
method dispatch.

Change-Id: I530baa6512daf3e4e4299783a822e16357723c9a
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContext.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicatedLogImplTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.