@@ -0,0 +1,2031 @@
+package com.nytimes.android.external.fs;%0A%0Aimport com.nytimes.android.external.fs.filesystem.FileSystem;%0Aimport com.nytimes.android.external.fs.filesystem.FileSystemFactory;%0Aimport com.nytimes.android.external.store.base.Persister;%0Aimport com.nytimes.android.external.store.base.impl.BarCode;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport javax.annotation.Nonnull;%0A%0Aimport okio.BufferedSource;%0A%0A/**%0A * Factory for %7B@link RecordPersister%7D%0A */%0A%0Apublic final class RecordPersisterFactory %7B%0A    private RecordPersisterFactory() %7B%0A    %7D%0A%0A    /**%0A     * Returns a new %7B@link BufferedSource%7D persister with the provided file as the root of the%0A     * persistence %7B@link com.nytimes.android.external.fs.filesystem.FileSystem%7D.%0A     *%0A     * @throws IOException%0A     */%0A    @Nonnull%0A    public static Persister%3CBufferedSource, BarCode%3E create(@Nonnull File root,%0A                                                            long expirationDuration,%0A                                                            @Nonnull TimeUnit expirationUnit) throws IOException %7B%0A        if (root == null) %7B%0A            throw new IllegalArgumentException(%22root file cannot be null.%22);%0A        %7D%0A        return new RecordPersister(FileSystemFactory.create(root), expirationDuration, expirationUnit);%0A    %7D%0A%0A    /**%0A     * Returns a new %7B@link BufferedSource%7D persister with the provided fileSystem as the root of the%0A     * persistence %7B@link com.nytimes.android.external.fs.filesystem.FileSystem%7D.%0A     **/%0A    @Nonnull%0A    public static Persister%3CBufferedSource, BarCode%3E create(@Nonnull FileSystem fileSystem,%0A                                                            long expirationDuration,%0A                                                            @Nonnull TimeUnit expirationUnit) %7B%0A        if (fileSystem == null) %7B%0A            throw new IllegalArgumentException(%22fileSystem cannot be null.%22);%0A        %7D%0A        return new RecordPersister(fileSystem, expirationDuration, expirationUnit);%0A    %7D%0A%0A%7D%0A

Introduce RecordPersisterFactory (#138)