1 package org.apache.commons.jcs.engine.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 /** 23 * ShutdownObservers can observe ShutdownObservable objects. 24 * The CacheManager is the primary observable that this is intended for. 25 * <p> 26 * Most shutdown operations will occur outside this framework for now. The initial 27 * goal is to allow background threads that are not reachable through any reference 28 * that the cache manager maintains to be killed on shutdown. 29 * <p> 30 * Perhaps the composite cache itself should be the observable object. 31 * It doesn't make much of a difference. There are some problems with 32 * region by region shutdown. Some auxiliaries are local. They will 33 * need to track when every region has shutdown before doing things like 34 * closing the socket with a lateral. 35 * <p> 36 * @author Aaron Smuts 37 * 38 */ 39 public interface IShutdownObservable 40 { 41 42 /** 43 * Registers an observer with the observable object. 44 * @param observer 45 */ 46 void registerShutdownObserver( IShutdownObserver observer ); 47 48 /** 49 * Deregisters the observer with the observable. 50 * 51 * @param observer 52 */ 53 void deregisterShutdownObserver( IShutdownObserver observer ); 54 55 }