mill.util

package mill.util

Members list

Type members

Classlikes

@Scaladoc(value = "/**\n * Manage the setup, teardown, and caching of objects of type [[V]] safely\n * in a multithreaded environment.\n *\n * The user provides the [[setup]] and [[teardown]] logic along with a [[maxCacheSize]],\n * and [[CachedFactory]] provides instances of [[V]] as requested using the [[withValue]]\n * method. These instances are automatically constructed on-demand from the give key,\n * cached with an LRU strategy, and destroyed when they are eventually evicted\n *\n * Intended for relatively small caches approximately O(num-threads) in size that\n * will typically get used in a build system, not intended for caching large amounts of entries\n */")
abstract class CachedFactory[K, V] extends AutoCloseable

Manage the setup, teardown, and caching of objects of type V safely in a multithreaded environment.

Manage the setup, teardown, and caching of objects of type V safely in a multithreaded environment.

The user provides the setup and teardown logic along with a maxCacheSize, and CachedFactory provides instances of V as requested using the withValue method. These instances are automatically constructed on-demand from the give key, cached with an LRU strategy, and destroyed when they are eventually evicted

Intended for relatively small caches approximately O(num-threads) in size that will typically get used in a build system, not intended for caching large amounts of entries

Attributes

Source
CachedFactory.scala
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any

Attributes

Companion
object
Source
CoursierSupport.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Jvm

Attributes

Companion
trait
Source
CoursierSupport.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class IgnoreQualifierVersion(val underlying: Version) extends AnyVal

Attributes

Source
Version.scala
Supertypes
class AnyVal
trait Matchable
class Any
@Scaladoc(value = "/**\n * Represents a JAR manifest.\n *\n * @param main the main manifest attributes\n * @param groups additional attributes for named entries\n */")
final class JarManifest

Represents a JAR manifest.

Represents a JAR manifest.

Value parameters

groups

additional attributes for named entries

main

the main manifest attributes

Attributes

Companion
object
Source
JarManifest.scala
Supertypes
class Object
trait Matchable
class Any
object JarManifest

Attributes

Companion
class
Source
JarManifest.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Jvm extends CoursierSupport

Attributes

Source
Jvm.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Jvm.type
final class MavenVersion(val underlying: Version) extends AnyVal

Attributes

Source
Version.scala
Supertypes
class AnyVal
trait Matchable
class Any
final class OsgiVersion(val underlying: Version) extends AnyVal

Attributes

Source
Version.scala
Supertypes
class AnyVal
trait Matchable
class Any
@Scaladoc(value = "/**\n * Generic retry functionality\n *\n * @param count How many times to retry before giving up\n * @param backoffMillis What is the initial backoff time\n * @param backoffMultiplier How much to multiply the initial backoff each time\n * @param timeoutMillis How much time we want to allow [[t]] to run. If passed,\n * runs [[t]] in a separate thread and throws a `TimeoutException`\n * if it takes too long\n * @param filter Whether or not we want to retry a given exception at a given retryCount;\n * defaults to `true` to retry all exceptions, but can be made more fine-grained\n * to only retry specific exceptions, or log them together with the retryCount\n * @param t The code block that we want to retry\n * @return the value of evaluating [[t]], or throws an exception if evaluating\n * [[t]] fails more than [[count]] times\n */")
case class Retry(count: Int, backoffMillis: Long, backoffMultiplier: Double, timeoutMillis: Long, filter: (Int, Throwable) => Boolean)

Generic retry functionality

Generic retry functionality

Value parameters

backoffMillis

What is the initial backoff time

backoffMultiplier

How much to multiply the initial backoff each time

count

How many times to retry before giving up

filter

Whether or not we want to retry a given exception at a given retryCount; defaults to true to retry all exceptions, but can be made more fine-grained to only retry specific exceptions, or log them together with the retryCount

t

The code block that we want to retry

timeoutMillis

How much time we want to allow t to run. If passed, runs t in a separate thread and throws a TimeoutException if it takes too long

Attributes

Returns

the value of evaluating t, or throws an exception if evaluating t fails more than count times

Source
Retry.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class Version

Attributes

Companion
object
Source
Version.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Version

Attributes

Companion
class
Source
Version.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Version.type