|
| 1 | +/* |
| 2 | + * Copyright 2002-2016 the original author or authors. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
1 | 16 | package org.springframework.cache.interceptor;
|
2 | 17 |
|
| 18 | +/** |
| 19 | + * Wrapper/Unwrapper, it allows to unwrap values to be cached and wraps it back |
| 20 | + * in order to be consumed. |
| 21 | + * @author Pablo Diaz-Lopez |
| 22 | + */ |
3 | 23 | interface CacheResultWrapper {
|
4 |
| - /** |
5 |
| - * Wraps to the wrapping target class |
6 |
| - * @param value the value to wrap |
7 |
| - * @return the value wrapped |
8 |
| - */ |
9 |
| - Object wrap(Object value); |
| 24 | + /** |
| 25 | + * Wraps to the wrapping target class |
| 26 | + * @param value the value to wrap |
| 27 | + * @return the value wrapped |
| 28 | + */ |
| 29 | + Object wrap(Object value); |
10 | 30 |
|
11 |
| - /** |
12 |
| - * Unwraps a value and returns it decorated if it needs in order to |
13 |
| - * notify the result, this will be the case if the wrapped value is not |
14 |
| - * available at the moment (it is calculated asynchronously |
15 |
| - * @param valueWrapped the value wrapped |
16 |
| - * @param asyncResult it will call it when the value it's available |
17 |
| - * @return the same value wrapped or a version decorated. |
18 |
| - */ |
19 |
| - Object unwrap(Object valueWrapped, AsyncWrapResult asyncResult); |
| 31 | + /** |
| 32 | + * Unwraps a value and returns it decorated if it needs in order to |
| 33 | + * notify the result, this will be the case if the wrapped value is not |
| 34 | + * available at the moment (it is calculated asynchronously |
| 35 | + * @param valueWrapped the value wrapped |
| 36 | + * @param asyncResult it will call it when the value it's available |
| 37 | + * @return the same value wrapped or a version decorated. |
| 38 | + */ |
| 39 | + Object unwrap(Object valueWrapped, AsyncWrapResult asyncResult); |
20 | 40 |
|
21 |
| - Class<?> getWrapClass(); |
| 41 | + /** |
| 42 | + * @return The target class the Wrapper can handle |
| 43 | + */ |
| 44 | + Class<?> getWrapClass(); |
22 | 45 | }
|
0 commit comments