abstract class ReloadableResource[T] extends Logging
- Alphabetic
- By Inheritance
- ReloadableResource
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ReloadableResource()
Abstract Value Members
- abstract def defaultResource: Option[T]
A backup backup resource that will be used if the files and backup cannot be loaded
A backup backup resource that will be used if the files and backup cannot be loaded
- Attributes
- protected
- abstract def loadFromBackup(): Option[T]
Load the resource from it's backup source (if any)
Load the resource from it's backup source (if any)
- Attributes
- protected
- abstract def loadFromPrimary(): Option[T]
Load the resource from it's primary source
Load the resource from it's primary source
- Attributes
- protected
- abstract def lookupLastModified(): Long
The Last Modified time of the resource (can be set to System.currentTimeMillis to always reload)
The Last Modified time of the resource (can be set to System.currentTimeMillis to always reload)
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def apply(): T
Get the current version of the resource
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def clear(): Unit
Clear the reference to the current version of the resource.
Clear the reference to the current version of the resource.
NOTE: Calling apply() after this will return null
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def disableAutoUpdateCheck(): Unit
Disable the auto update checks
- final def enableAutoUpdateCheck(delaySeconds: Int = 300, periodSeconds: Int = 300): Unit
Enable checking and automatic reload of the resource if the external file is updated
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Definition Classes
- ReloadableResource → AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isAutoUpdateCheckEnabled: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def loadResource(): T
Directly load the resource and return the result.
Directly load the resource and return the result. Doesn't touch the current resource in this class.
- lazy val logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
- Annotations
- @transient()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def reload(): Boolean
Attempt to reload the current resource.
Attempt to reload the current resource. If there is a problem the existing version will be left in place
Returns true if the resource was successfully updated
TODO: This should probably return an Option[Long] which is the last modified time of the reloaded resource
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])