code: public NodeId put(
  		final String stateName,
  		final EventId eventId,
  		@Nullable final NodeId previousNodeId,
  		final DeweyNumber version) {
  
  		if (previousNodeId != null) {
  			lockNode(previousNodeId);
  		}
  
  		NodeId currentNodeId = new NodeId(eventId, getOriginalNameFromInternal(stateName));
  		Lockable<SharedBufferNode> currentNode = sharedBuffer.getEntry(currentNodeId);
  		if (currentNode == null) {
  			currentNode = new Lockable<>(new SharedBufferNode(), 0);
  			lockEvent(eventId);
  		}
  
  		currentNode.getElement().addEdge(new SharedBufferEdge(
  			previousNodeId,
  			version));
  		sharedBuffer.upsertEntry(currentNodeId, currentNode);
  
  		return currentNodeId;
  	}
docs: Stores given value (value + timestamp) under the given state. It assigns a preceding element
  relation to the previous entry.
  
  @param stateName      name of the state that the event should be assigned to
  @param eventId        unique id of event assigned by this SharedBuffer
  @param previousNodeId id of previous entry (might be null if start of new run)
  @param version        Version of the previous relation
  @return assigned id of this element