io.milvus.pool

## Class PoolClientFactory<C,T>

- java.lang.Object
- - org.apache.commons.pool2.BaseObject
  - - org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>
    - - io.milvus.pool.PoolClientFactory<C,T>

All Implemented Interfaces:
  org.apache.commons.pool2.KeyedPooledObjectFactory<java.lang.String,T>

    public class PoolClientFactory<C,T>
    extends org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>

### Constructor Summary

Constructors
Constructor and Description
`PoolClientFactory(C config, java.lang.String clientClassName)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `activateObject(java.lang.String key, org.apache.commons.pool2.PooledObject<T> p)`
`T` `create(java.lang.String key)`
`void` `destroyObject(java.lang.String key, org.apache.commons.pool2.PooledObject<T> p)`
`void` `passivateObject(java.lang.String key, org.apache.commons.pool2.PooledObject<T> p)`
`boolean` `validateObject(java.lang.String key, org.apache.commons.pool2.PooledObject<T> p)`
`org.apache.commons.pool2.PooledObject<T>` `wrap(T client)`

### Methods inherited from class org.apache.commons.pool2.BaseKeyedPooledObjectFactory

`makeObject`

### Methods inherited from class org.apache.commons.pool2.BaseObject

`toString`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.commons.pool2.KeyedPooledObjectFactory

`destroyObject`

### Constructor Detail

#### PoolClientFactory

    public PoolClientFactory(C config,
                             java.lang.String clientClassName)
                      throws java.lang.ClassNotFoundException,
                             java.lang.NoSuchMethodException

Throws:
  `java.lang.ClassNotFoundException`
  `java.lang.NoSuchMethodException`

### Method Detail

#### create

    public T create(java.lang.String key)
             throws java.lang.Exception

Specified by:
  `create` in class `org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>`
Throws:
  `java.lang.Exception`

#### wrap

    public org.apache.commons.pool2.PooledObject<T> wrap(T client)

Specified by:
  `wrap` in class `org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>`

#### destroyObject

    public void destroyObject(java.lang.String key,
                              org.apache.commons.pool2.PooledObject<T> p)
                       throws java.lang.Exception

Specified by:
  `destroyObject` in interface `org.apache.commons.pool2.KeyedPooledObjectFactory<java.lang.String,T>`
Overrides:
  `destroyObject` in class `org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>`
Throws:
  `java.lang.Exception`

#### validateObject

    public boolean validateObject(java.lang.String key,
                                  org.apache.commons.pool2.PooledObject<T> p)

Specified by:
  `validateObject` in interface `org.apache.commons.pool2.KeyedPooledObjectFactory<java.lang.String,T>`
Overrides:
  `validateObject` in class `org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>`

#### activateObject

    public void activateObject(java.lang.String key,
                               org.apache.commons.pool2.PooledObject<T> p)
                        throws java.lang.Exception

Specified by:
  `activateObject` in interface `org.apache.commons.pool2.KeyedPooledObjectFactory<java.lang.String,T>`
Overrides:
  `activateObject` in class `org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>`
Throws:
  `java.lang.Exception`

#### passivateObject

    public void passivateObject(java.lang.String key,
                                org.apache.commons.pool2.PooledObject<T> p)
                         throws java.lang.Exception

Specified by:
  `passivateObject` in interface `org.apache.commons.pool2.KeyedPooledObjectFactory<java.lang.String,T>`
Overrides:
  `passivateObject` in class `org.apache.commons.pool2.BaseKeyedPooledObjectFactory<java.lang.String,T>`
Throws:
  `java.lang.Exception`