Merge "Adjust Tx rate limiter for unused transactions"
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / NoopProcedure.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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 package org.opendaylight.controller.cluster.raft;
9
10 import akka.japi.Procedure;
11
12 /**
13  * An akka Procedure that does nothing.
14  *
15  * @author Thomas Pantelis
16  */
17 public class NoopProcedure<T> implements Procedure<T> {
18
19     private static final NoopProcedure<Object> INSTANCE = new NoopProcedure<>();
20
21     private NoopProcedure() {
22     }
23
24     @SuppressWarnings("unchecked")
25     public static <T> NoopProcedure<T> instance() {
26         return (NoopProcedure<T>) INSTANCE;
27     }
28
29     @Override
30     public void apply(Object notUsed) {
31     }
32 }