Package-level declarations

Types

Link copied to clipboard
abstract class AutoCloseableInstanceTracker<T>(val unbindOnClose: Boolean = UNBIND_ON_CLOSE_DEFAULT, setCreator: () -> MutableSet<T>? = null) : InstanceTracker<T> , AutoCloseable

InstanceTracker which also implements the AutoCloseable interface.

Link copied to clipboard
abstract class BasicThreadFactory(isDaemon: Boolean = false, priority: Int = -1) : CommonsThreadFactoryAdapter

An abstract ThreadFactory implementation for simple customization.

Link copied to clipboard
Link copied to clipboard

Adapter class for creating a ThreadFactory using CommonsBasicThreadFactory.

Link copied to clipboard
open class CountingThreadFactory(prefix: String, isDaemon: Boolean = false, priority: Int = -1) : CommonsThreadFactoryAdapter

A thread factory which creates threads with the given prefix as its name. Each thread will end up with a name of $prefix-thread-$id, where id is an incrementing number for each created thread.

Link copied to clipboard
abstract class InstanceTracker<T>(setCreator: () -> MutableSet<T>? = null)

A generic Set for tracking object instances.

Link copied to clipboard
object JsonUtils
Link copied to clipboard
Link copied to clipboard
open class SemVer(val major: BigInteger, val minor: BigInteger, val patch: BigInteger, val prerel: String? = null, val buildMetadata: String? = null) : Comparable<SemVer>

Representation of a version string in the format of Semantic Versioning 2.0.

Link copied to clipboard
class SingleJsonPathBuilder(initialPath: String = "")

Builder for generating a JSON path expression to a single JSON subtree or child.

Link copied to clipboard
interface StateTraceable<T, E>

Interface which marks a job or task as state-traceable, i.e. the current state of the job or task can be queried by external classes.

Link copied to clipboard
data class ThrowableSummary(val type: String, val message: String?, val context: List<String>?, val stacktrace: List<String>)

Stores the serializable summary of a Throwable

Link copied to clipboard
sealed class TraceableState<out T, out E>

An abstraction for the current state of a job or task.

Link copied to clipboard
object YamlUtils

Properties

Link copied to clipboard
private val fileLogbackLevel: Level?
Link copied to clipboard
val fileLoggingLevel: Level?

The SLF4JLevel for the FILE logger appender, or null if the FILE logger appender is not specified in the root logger.

Link copied to clipboard
private val rootLogger: Logger

The instance of LogbackLogger representing the root Logback logger.

Link copied to clipboard
private val stdoutLogbackLevel: Level
Link copied to clipboard

The SLF4JLevel for the STDOUT logger appender.

Functions

Link copied to clipboard
fun findKClassBy(paths: List<String>): KClass<*>?
Link copied to clipboard
private fun getAppenderLevel(logger: Logger, name: String): Level?

Obtains the logger level for an appender of a logger.

Link copied to clipboard
inline fun <T : Any> Logger(): Logger

Convenience method for LoggerFactory.getLogger with a static type.

fun Logger(name: String): Logger
fun Logger(clazz: KClass<out Any>): Logger

Convenience method for LoggerFactory.getLogger.

fun Logger(clazz: KClass<out Any>, transform: (String) -> String? = null): Logger

Convenience method for retrieving the SLF4JLogger for a type.

Link copied to clipboard
fun Path.readLinesUntil(upToBytes: Long): List<String>

Retrieves the lines in the file with path this, up to upToBytes number of bytes. If the file size in bytes exceeds upToBytes, the lines are truncated up to the said byte size, an extra trailing string will be appended to indicate that it is truncated and the size in the format: "...<truncated ($upToBytes ?B of $totalNumOfBytes ?B)>", where

Link copied to clipboard
@VisibleForTesting
internal fun InputStream.readLinesUntilImpl(upToBytes: Long, nioLineSplitting: Boolean): List<String>
@VisibleForTesting
internal fun Path.readLinesUntilImpl(upToBytes: Long, nioLineSplitting: Boolean): List<String>

Implementation for readLinesUntil.

Link copied to clipboard
fun truncationMessage(upToBytes: Long, totalNumOfBytes: Long): String
Link copied to clipboard
fun truncationMessageApprox(upToBytes: Long, approxTotalNumOfBytes: Long): String