01: /*
02: * Distributed as part of c3p0 v.0.9.1.2
03: *
04: * Copyright (C) 2005 Machinery For Change, Inc.
05: *
06: * Author: Steve Waldman <swaldman@mchange.com>
07: *
08: * This library is free software; you can redistribute it and/or modify
09: * it under the terms of the GNU Lesser General Public License version 2.1, as
10: * published by the Free Software Foundation.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public License
18: * along with this software; see the file LICENSE. If not, write to the
19: * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20: * Boston, MA 02111-1307, USA.
21: */
22:
23: package com.mchange.v2.resourcepool;
24:
25: import java.util.EventObject;
26:
27: public class ResourcePoolEvent extends EventObject {
28: Object resc;
29: boolean checked_out_resource;
30: int pool_size;
31: int available_size;
32: int removed_but_unreturned_size;
33:
34: public ResourcePoolEvent(ResourcePool pool, Object resc,
35: boolean checked_out_resource, int pool_size,
36: int available_size, int removed_but_unreturned_size) {
37: super (pool);
38: this .resc = resc;
39: this .checked_out_resource = checked_out_resource;
40: this .pool_size = pool_size;
41: this .available_size = available_size;
42: this .removed_but_unreturned_size = removed_but_unreturned_size;
43: }
44:
45: public Object getResource() {
46: return resc;
47: }
48:
49: public boolean isCheckedOutResource() {
50: return checked_out_resource;
51: }
52:
53: public int getPoolSize() {
54: return pool_size;
55: }
56:
57: public int getAvailableSize() {
58: return available_size;
59: }
60:
61: public int getRemovedButUnreturnedSize() {
62: return removed_but_unreturned_size;
63: }
64: }
|