Class EnvelopeCache

    • Field Detail

      • SUFFIX_ENVELOPE_FILE

        public static final java.lang.String SUFFIX_ENVELOPE_FILE
        File suffix added to all serialized envelopes files.
        See Also:
        Constant Field Values
      • PREFIX_CURRENT_SESSION_FILE

        public static final java.lang.String PREFIX_CURRENT_SESSION_FILE
        See Also:
        Constant Field Values
      • CRASH_MARKER_FILE

        public static final java.lang.String CRASH_MARKER_FILE
        See Also:
        Constant Field Values
      • NATIVE_CRASH_MARKER_FILE

        public static final java.lang.String NATIVE_CRASH_MARKER_FILE
        See Also:
        Constant Field Values
      • UTF_8

        protected static final java.nio.charset.Charset UTF_8
      • options

        @NotNull
        protected final @NotNull SentryOptions options
      • serializer

        @NotNull
        protected final @NotNull ISerializer serializer
      • directory

        @NotNull
        protected final @NotNull java.io.File directory
    • Method Detail

      • store

        public void store​(@NotNull
                          @NotNull SentryEnvelope envelope,
                          @Nullable
                          @Nullable java.lang.Object hint)
        Specified by:
        store in interface IEnvelopeCache
      • iterator

        @NotNull
        public @NotNull java.util.Iterator<SentryEnvelope> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<SentryEnvelope>
      • isDirectoryValid

        protected boolean isDirectoryValid()
        Check if a dir. is valid and have write and read permission
        Returns:
        true if valid and has permissions or false otherwise
      • rotateCacheIfNeeded

        protected void rotateCacheIfNeeded​(@NotNull
                                           @NotNull java.io.File[] files)
        Rotates the caching folder if full, deleting the oldest files first
        Parameters:
        files - the Files