class DynamicTaskExecutor implements TaskExecutor<LOCAL> {

    @Override
    public int processors( int delta )
    {
        if ( shutDown || delta == 0 )
        {
            return processors.length;
        }

        synchronized ( this )
        {
            if ( shutDown )
            {
                return processors.length;
            }

            int requestedNumber = processors.length + delta;
            if ( delta > 0 )
            {
                requestedNumber = min( requestedNumber, maxProcessorCount );
                if ( requestedNumber > processors.length )
                {
                    Processor[] newProcessors = Arrays.copyOf( processors, requestedNumber );
                    for ( int i = processors.length; i < requestedNumber; i++ )
                    {
                        newProcessors[i] = new Processor( processorThreadNamePrefix + "-" + i );
                    }
                    this.processors = newProcessors;
                }
            }
            else
            {
                requestedNumber = max( 1, requestedNumber );
                if ( requestedNumber < processors.length )
                {
                    Processor[] newProcessors = Arrays.copyOf( processors, requestedNumber );
                    for ( int i = newProcessors.length; i < processors.length; i++ )
                    {
                        processors[i].processorShutDown = true;
                    }
                    this.processors = newProcessors;
                }
            }
            return processors.length;
        }
    }

    public  DynamicTaskExecutor( int initialProcessorCount, int maxProcessorCount, int maxQueueSize,
            ParkStrategy parkStrategy, String processorThreadNamePrefix );
    public  DynamicTaskExecutor( int initialProcessorCount, int maxProcessorCount, int maxQueueSize,
            ParkStrategy parkStrategy, String processorThreadNamePrefix, Supplier<LOCAL> initialLocalState );

}