View Javadoc

1   package org.apache.jcs.auxiliary.remote.behavior;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.jcs.auxiliary.AuxiliaryCache;
23  
24  /***
25   * This defines the behavior expected of a remote cache client. This extends Auxiliary cache which
26   * in turn extends ICache.
27   * <p>
28   * I'd like generalize this a bit.
29   * <p>
30   * @author Aaron Smuts
31   */
32  public interface IRemoteCacheClient
33      extends AuxiliaryCache
34  {
35      /***
36       * Replaces the current remote cache service handle with the given handle. If the current remote
37       * is a Zombie, the propagate teh events that may be queued to the restored service.
38       * <p>
39       * @param remote IRemoteCacheService -- the remote server or proxy to the remote server
40       */
41      public void fixCache( IRemoteCacheService remote );
42  
43      /***
44       * Gets the listenerId attribute of the RemoteCacheListener object.
45       * <p>
46       * All requests to the remote cache must include a listener id. This allows the server to avoid
47       * sending updates the the listener associated with this client.
48       * <p>
49       * @return The listenerId value
50       */
51      public long getListenerId();
52  
53      /***
54       * This returns the listener associated with this remote cache. TODO we should try to get this
55       * out of the interface.
56       * <p>
57       * @return IRemoteCacheListener
58       */
59      public IRemoteCacheListener getListener();
60  }