io.undertow.util

## Class NewInstanceObjectPool<T>

- java.lang.Object
- - io.undertow.util.NewInstanceObjectPool<T>

All Implemented Interfaces:
  ObjectPool

    public class NewInstanceObjectPool<T>
    extends Object
    implements ObjectPool

Author:
  ckozak, Stuart Douglas

### Constructor Summary

Constructors
Constructor and Description
`NewInstanceObjectPool(Supplier<T> supplier, Consumer<T> consumer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`PooledObject` `allocate()`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### NewInstanceObjectPool

    public NewInstanceObjectPool(Supplier<T> supplier,
                                 Consumer<T> consumer)

### Method Detail

#### allocate

    public PooledObject allocate()

Specified by:
  `allocate` in interface `ObjectPool`