1 /**
2 * Copyright 2005-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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 */
16 package org.kuali.rice.core.api.cache;
17
18 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
19
20 import javax.jws.WebMethod;
21 import javax.jws.WebParam;
22 import javax.jws.soap.SOAPBinding;
23 import java.util.Collection;
24
25 /**
26 * A service which facilitates remote operations against a cache which is deployed using Kuali Rice's core caching
27 * infrastructure. The only operation currently supported by this service allows for flushing of cache entries based on
28 * a specified collection of {@link CacheTarget} objects. These cache targets specify information about which cache
29 * entries should be flushed.
30 *
31 * <p>This service exists primarily to support client-side caching of data provided by remote services. It allows the
32 * host of the service to notify the client application about flush events, which typically result whenever changes
33 * have been made to data such that it would be stale if cached within the client.</p>
34 *
35 * @author Kuali Rice Team (rice.collab@kuali.org)
36 * @since 2.0
37 */
38 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
39 public interface CacheAdminService {
40
41 /**
42 * Flushes an object or group of objects from the cache based on a cache target. If the given collection of cache
43 * targets is empty or null, this method will do nothing.
44 *
45 * @param cacheTargets a collection of targets to flush
46 * @throws RiceIllegalArgumentException if {@code cacheTargets} contains any null items.
47 */
48 @WebMethod(operationName = "flush")
49 void flush(@WebParam(name = "cacheTargets") Collection<CacheTarget> cacheTargets) throws RiceIllegalArgumentException;
50
51 }