Enable checkstyle in mdsal-binding-util
[mdsal.git] / binding / mdsal-binding-util / src / main / java / org / opendaylight / mdsal / binding / util / InterruptibleCheckedConsumer.java
1 /*
2  * Copyright (c) 2017 Red Hat, 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.mdsal.binding.util;
9
10 import java.util.function.Consumer;
11
12 /**
13  * {@link Consumer} which can throw a checked exception and be interrupted.
14  *
15  * @param <T> the type of the input to the operation
16  * @param <E> the type of the Exception to the operation
17  *
18  * @see Consumer
19  */
20 @FunctionalInterface
21 public interface InterruptibleCheckedConsumer<T, E extends Exception> {
22
23     void accept(T input) throws E, InterruptedException;
24
25 }