client/src/main/java/eventstore/j/EsConnection.java
Future<WriteResult> writeEvents(
      String stream,
      ExpectedVersion expectedVersion,
      Collection<EventData> events,
      UserCredentials credentials);
/**
   * Write events to a stream
   * <p>
   * When writing events to a stream the {@link eventstore.core.ExpectedVersion} choice can
   * make a very large difference in the observed behavior. For example, if no stream exists
   * and ExpectedVersion.Any is used, a new stream will be implicitly created when appending.
   * <p>
   * There are also differences in idempotency between different types of calls.
   * If you specify an ExpectedVersion aside from ExpectedVersion.Any the Event Store
   * will give you an idempotency guarantee. If using ExpectedVersion.Any the Event Store
   * will do its best to provide idempotency but does not guarantee idempotency
   *
   * @param stream          name of the stream to write events to
   * @param expectedVersion expected version of the stream to write to, or <code>ExpectedVersion.Any</code> if <code>null</code>
   * @param events          events to append to the stream
   * @param credentials     optional user credentials to perform operation with.
   * @return A {@link scala.concurrent.Future} that the caller can await on
   */
Write events to a stream

When writing events to a stream the  eventstore.core.ExpectedVersion choice can
make a very large difference in the observed behavior. For example, if no stream exists
and ExpectedVersion.Any is used, a new stream will be implicitly created when appending.

There are also differences in idempotency between different types of calls.
If you specify an ExpectedVersion aside from ExpectedVersion.Any the Event Store
will give you an idempotency guarantee. If using ExpectedVersion.Any the Event Store
will do its best to provide idempotency but does not guarantee idempotency

@param stream          name of the stream to write events to
@param expectedVersion expected version of the stream to write to, or ExpectedVersion.Any if null
@param events          events to append to the stream
@param credentials     optional user credentials to perform operation with.
@return A  scala.concurrent.Future that the caller can await on
Write events to a stream When writing events to a stream the eventstore . core . ExpectedVersion choice can make a very large difference in the observed behavior . For example if no stream exists and ExpectedVersion . Any is used a new stream will be implicitly created when appending . There are also differences in idempotency between different types of calls . If you specify an ExpectedVersion aside from ExpectedVersion . Any the Event Store will give you an idempotency guarantee . If using ExpectedVersion . Any the Event Store will do its best to provide idempotency but does not guarantee idempotency @param stream name of the stream to write events to @param expectedVersion expected version of the stream to write to or ExpectedVersion . Any if null @param events events to append to the stream @param credentials optional user credentials to perform operation with . @return A scala . concurrent . Future that the caller can await on
Future<WriteResult> writeEvents(
      String stream,
      ExpectedVersion expectedVersion,
      Collection<EventData> events,
      UserCredentials credentials);
Future < WriteResult > writeEvents ( String stream , ExpectedVersion expectedVersion , Collection < EventData > events , UserCredentials credentials ) ;
Write events to a stream
 <p>
 When writing events to a stream the {@link eventstore.core.ExpectedVersion} choice can
 make a very large difference in the observed behavior.
Write events to a stream <p > When writing events to a stream the { @link eventstore . core . ExpectedVersion } choice can make a very large difference in the observed behavior .