class Slot {

    public WriteReport write(final Timber.LogEvent event) throws IOException {
        // Ensure that we have a RecordWriter
        if (null == currentWriter) {

            // Make sure we have not closed this Slot
            if (closed) {
                throw new IllegalStateException("Slot was closed");
            }

            currentFile = findNextSlotFile();

            // Pick up number of bytes in file
            numBytesInFile = currentFile.length();

            // Note: the FileOutPutStream must have append = true
            currentWriter = new RecordWriter(
                new BufferedOutputStream(
                    new FileOutputStream(currentFile, true),
                    outputBufferSize));
            writeCount = 0;
        }

        final long startOffset = numBytesInFile;

        // Invariant: we have a currentWriter
        numBytesInFile += currentWriter.write(event);
        writeCount++;

        // Make return value here to keep currentFile object (removed in closeIntenal()).
        final WriteReport ret =
            new WriteReport(currentFile, startOffset, numBytesInFile, writeCount);

        // Check if it is time to finish this file
        if (numBytesInFile > maxSize) {
            closeInternal();
        }

        return ret;
    }

    public  Slot(final String prefix, final long maxSize);
    public  Slot(final String prefix, final long maxSize, final TimeProvider timeProvider);

}