Add optional timeout parameter for backup rpc
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / client / messages / FindLeader.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.raft.client.messages;
10
11 import com.google.common.annotations.VisibleForTesting;
12 import java.io.Serializable;
13
14 /**
15  * Request to locate the leader raft actor. Each {@link org.opendaylight.controller.cluster.raft.RaftActor} must
16  * respond with a {@link FindLeaderReply} containing the address of the leader, as it is known to that particular
17  * actor.
18  *
19  * <p>
20  * This message is intended for testing purposes only.
21  */
22 @VisibleForTesting
23 public final class FindLeader implements Serializable {
24     private static final long serialVersionUID = 1L;
25     public static final FindLeader INSTANCE = new FindLeader();
26
27     private FindLeader() {
28         // Hidden to force reuse
29     }
30
31     private Object readResolve() {
32         return INSTANCE;
33     }
34 }