class CreateAsyncOperationActor {

    public void create(final CreateAsyncOperationMessage message) throws CreateAsyncOperationActorException {

        try {
            String token = IOC.resolve(Keys.getOrAdd("db.collection.nextid"));
            Integer amountOfHoursToExpireFromNow = message.getExpiredTime();
            String expiredTime = LocalDateTime.now().plusHours(amountOfHoursToExpireFromNow).format(formatter);
            message.setSessionIdInData(message.getSessionId());
            IObject authOperationData = message.getOperationData();
            collection.createAsyncOperation(authOperationData, token, expiredTime);

            message.setAsyncOperationToken(token);

            List<String> availableTokens = message.getOperationTokens();
            if (availableTokens == null) {
                message.setOperationTokens(Arrays.asList(token));
            } else {
                availableTokens.add(token);
                message.setOperationTokens(availableTokens);
            }
        } catch (ResolutionException | ReadValueException | ChangeValueException | CreateAsyncOperationException e) {
            throw new CreateAsyncOperationActorException("Can't create async operation.", e);
        }
    }

    public  CreateAsyncOperationActor(final IObject params);

}