public synchronized void publish()

in src/main/java/com/amazonaws/services/neptune/io/Stream.java [57:79]


    public synchronized void publish(String s) {

        if (StringUtils.isNotEmpty(s) && s.length() > 2) {

            try {
                long partitionKeyValue = counter.incrementAndGet();
                byte[] bytes = s.getBytes(StandardCharsets.UTF_8.name());

                if (bytes.length > MAX_SIZE_BYTES && largeStreamRecordHandlingStrategy.allowSplit()) {
                    Collection<String> splitRecords = splitter.split(s);
                    for (String splitRecord : splitRecords) {
                        publish(partitionKeyValue, splitRecord.getBytes(StandardCharsets.UTF_8.name()));
                    }
                } else {
                    publish(partitionKeyValue, bytes);
                }


            } catch (UnsupportedEncodingException e) {
                logger.error(e.getMessage());
            }
        }
    }