1 package com.protomatter.util; 2 3 52 53 import com.protomatter.pool.*; 54 import com.protomatter.syslog.Syslog; 55 import java.util.*; 56 57 61 class MutexObject 62 extends GrowingObjectPool 63 { 64 private boolean initialized = false; 65 66 public MutexObject() 67 { 68 Hashtable args = new Hashtable(); 69 args.put("pool.initialSize", new Integer (0)); 70 args.put("pool.maxSize", new Integer (1)); 71 init(args); 72 } 73 74 81 public void init(Hashtable args) 82 { 83 if (this.initialized == true) 85 return; 86 this.initialized = true; 87 try 88 { 89 super.init(args); 90 } 91 catch (Exception x) 92 { 93 ; } 96 } 97 98 103 protected ObjectPoolObject createObjectPoolObject() 104 { 105 return new MutexToken(); 106 } 107 108 111 public Object getSyncObject() 112 { 113 return super.getSyncObject(); 114 } 115 } 116 | Popular Tags |