class ContractCheckingIndexProxy extends DelegatingIndexProxy {

    @Override
    public void start()
    {
        if ( state.compareAndSet( State.INIT, State.STARTING ) )
        {
            try
            {
                super.start();
            }
            finally
            {
                this.state.set( State.STARTED );
            }
        }
        else
        {
            throw new IllegalStateException( "An IndexProxy can only be started once" );
        }
    }

    public  ContractCheckingIndexProxy( IndexProxy delegate, boolean started );

}