code: public static <E> RingBuffer<E> create(
          ProducerType producerType,
          EventFactory<E> factory,
          int bufferSize,
          WaitStrategy waitStrategy)
      {
          switch (producerType)
          {
              case SINGLE:
                  return createSingleProducer(factory, bufferSize, waitStrategy);
              case MULTI:
                  return createMultiProducer(factory, bufferSize, waitStrategy);
              default:
                  throw new IllegalStateException(producerType.toString());
          }
      }
docs: Create a new Ring Buffer with the specified producer type (SINGLE or MULTI)
  
  @param <E> Class of the event stored in the ring buffer.
  @param producerType producer type to use {@link ProducerType}.
  @param factory      used to create events within the ring buffer.
  @param bufferSize   number of elements to create within the ring buffer.
  @param waitStrategy used to determine how to wait for new elements to become available.
  @return a constructed ring buffer.
  @throws IllegalArgumentException if bufferSize is less than 1 or not a power of 2