@ApiStatus.Internal public final class EnvelopeCache extends java.lang.Object implements IEnvelopeCache
Modifier and Type | Field and Description |
---|---|
protected @NotNull java.io.File |
directory |
protected @NotNull SentryOptions |
options |
static java.lang.String |
PREFIX_CURRENT_SESSION_FILE |
protected @NotNull ISerializer |
serializer |
static java.lang.String |
SUFFIX_ENVELOPE_FILE
File suffix added to all serialized envelopes files.
|
protected static java.nio.charset.Charset |
UTF_8 |
Constructor and Description |
---|
EnvelopeCache(@NotNull SentryOptions options) |
Modifier and Type | Method and Description |
---|---|
void |
discard(@NotNull SentryEnvelope envelope) |
protected boolean |
isDirectoryValid()
Check if a dir.
|
@NotNull java.util.Iterator<SentryEnvelope> |
iterator() |
protected void |
rotateCacheIfNeeded(@NotNull java.io.File[] files)
Rotates the caching folder if full, deleting the oldest files first
|
void |
store(@NotNull SentryEnvelope envelope,
@Nullable java.lang.Object hint) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
store
public static final java.lang.String SUFFIX_ENVELOPE_FILE
public static final java.lang.String PREFIX_CURRENT_SESSION_FILE
protected static final java.nio.charset.Charset UTF_8
@NotNull protected final @NotNull SentryOptions options
@NotNull protected final @NotNull ISerializer serializer
@NotNull protected final @NotNull java.io.File directory
public EnvelopeCache(@NotNull @NotNull SentryOptions options)
public void store(@NotNull @NotNull SentryEnvelope envelope, @Nullable @Nullable java.lang.Object hint)
store
in interface IEnvelopeCache
public void discard(@NotNull @NotNull SentryEnvelope envelope)
discard
in interface IEnvelopeCache
@NotNull public @NotNull java.util.Iterator<SentryEnvelope> iterator()
iterator
in interface java.lang.Iterable<SentryEnvelope>
protected boolean isDirectoryValid()
protected void rotateCacheIfNeeded(@NotNull @NotNull java.io.File[] files)
files
- the Files