APISonar


org.nustaq.logging.FSTLogger.log

> org > nustaq > logging > FSTLogger > log
org APIs nustaq APIs logging APIs FSTLogger APIs log APIs

Example 1
private static final FSTLogger logger = FSTLogger.getLogger(BinaryQueue.class);

    public long poll(ByteSink destination, long destoff, long destlen) {
        long count = 0;
        try {
            while (pollIndex != addIndex && count < destlen) {
                destination.put(destoff + count++, storage.get(pollIndex++));
                if (pollIndex >= storage.length()) {
                    pollIndex = 0;
                }
            }
        } catch (Exception e) {
            logger.log(FSTLogger.Level.ERROR, "Failed to poll", e);
        }
        return count;
    }