TX_COMMIT_TIMEOUT_CHECK_MESSAGE is a constant, hence calling equals on it
with the message parameter should be faster than the over way around.
Change-Id: I4d8b8bfa644e7802d90059369266e2227e5c1ca3
Signed-off-by: Robert Varga <rovarga@cisco.com>
PeerAddressResolved resolved = (PeerAddressResolved) message;
setPeerAddress(resolved.getPeerId().toString(),
resolved.getPeerAddress());
PeerAddressResolved resolved = (PeerAddressResolved) message;
setPeerAddress(resolved.getPeerId().toString(),
resolved.getPeerAddress());
- } else if (message.equals(TX_COMMIT_TIMEOUT_CHECK_MESSAGE)) {
+ } else if (TX_COMMIT_TIMEOUT_CHECK_MESSAGE.equals(message)) {
commitCoordinator.checkForExpiredTransactions(transactionCommitTimeout, this);
} else if(message instanceof DatastoreContext) {
onDatastoreContext((DatastoreContext)message);
commitCoordinator.checkForExpiredTransactions(transactionCommitTimeout, this);
} else if(message instanceof DatastoreContext) {
onDatastoreContext((DatastoreContext)message);