BufferAllocator allocator ( ) { Class < ? > allocator = reader . getClass ( ALLOCATOR , UnpooledUnsafeHeapAllocator . class ) ; try { return ( BufferAllocator ) allocator . newInstance ( ) ; } catch ( InstantiationException | IllegalAccessException e ) { throw new ConfigurationException ( e ) ; } catch ( ClassCastException e ) { throw new ConfigurationException ( "invalid allocator class: " + allocator . getName ( ) ) ; } }
Returns the serializer buffer allocator .