blob: 87e33b9baf4a665c54ac844505ad2975603146d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.netconf.sal.restconf.impl;
import com.google.common.util.concurrent.FluentFuture;
import javax.ws.rs.core.Response.Status;
import org.opendaylight.mdsal.common.api.CommitInfo;
/**
* Wrapper for status and future of PUT operation.
*/
public class PutResult {
private final Status status;
private final FluentFuture<? extends CommitInfo> future;
/**
* Wrap status and future by constructor - make this immutable.
*
* @param status
* status of operations
* @param future
* result of submit of PUT operation
*/
public PutResult(final Status status, final FluentFuture<? extends CommitInfo> future) {
this.status = status;
this.future = future;
}
/**
* Get status.
*
* @return {@link Status} result
*/
public Status getStatus() {
return this.status;
}
/**
* Get future.
*
* @return {@link FluentFuture} result
*/
public FluentFuture<? extends CommitInfo> getFutureOfPutData() {
return this.future;
}
}
|