01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: BlockingRepositoryCleanup.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.rep;
09:
10: /**
11: * The <code>BlockingRepositoryCleanup</code> class is simply a thread that
12: * calls the <code>BlockingRepository</code>'s {@link
13: * BlockingRepository#cleanup() cleanup} method.
14: * <p>It's typically used by the repository to register its own cleanup as a
15: * mandatory shutdown hook.
16: *
17: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
18: * @version $Revision: 3634 $
19: * @see BlockingRepository#cleanup()
20: * @since 1.0
21: */
22: public class BlockingRepositoryCleanup extends Thread {
23: private BlockingRepository mRepository = null;
24:
25: public BlockingRepositoryCleanup(BlockingRepository repository) {
26: mRepository = repository;
27: }
28:
29: public void run() {
30: mRepository.cleanup();
31: }
32: }
|