Record Class Loader.PendingDeployment
java.lang.Object
java.lang.Record
dev.getelements.elements.app.serve.loader.Loader.PendingDeployment
- Record Components:
uris- a predicate that returns true if the URI is new, false if it has already been recorded.logs- a consumer of log messageserrors- a consumer of errors
- Enclosing interface:
Loader
public static record Loader.PendingDeployment(Predicate<URI> uris, Consumer<String> logs, Consumer<String> warnings, Consumer<Throwable> errors)
extends Record
Provides context and callbacks for pending deployments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<ThrowableT extends Throwable>
ThrowableTerror(ThrowableT throwable) Records a Throwable to the deployment errors.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.voidstatic voidLogs a message to the deployment log.voidstatic voidLogs a formatted message to the deployment log.logs()Returns the value of thelogsrecord component.voidlogWarning(String message) voidlogWarningf(String fmt, Object... args) final StringtoString()Returns a string representation of this record class.voidRecords a URI to the deployment record.uris()Returns the value of theurisrecord component.<ThrowableT extends Throwable>
ThrowableTwarning(ThrowableT throwable) Records a Throwable to the deployment errors.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
Method Details
-
log
-
logf
-
logWarning
-
logWarningf
-
log
Logs a message to the deployment log.- Parameters:
message- the message
-
logf
Logs a formatted message to the deployment log.- Parameters:
format- the formatargs- the arguments
-
uri
Records a URI to the deployment record.- Parameters:
uri- the uri
-
warning
Records a Throwable to the deployment errors. Returns the same throwable for convenience such that it may be re-thrown.- Parameters:
throwable- the throwable- Returns:
- the same throwable
-
error
Records a Throwable to the deployment errors. Returns the same throwable for convenience such that it may be re-thrown.- Parameters:
throwable- the throwable- Returns:
- the same throwable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
uris
Returns the value of theurisrecord component.- Returns:
- the value of the
urisrecord component
-
logs
Returns the value of thelogsrecord component.- Returns:
- the value of the
logsrecord component
-
warnings
Returns the value of thewarningsrecord component.- Returns:
- the value of the
warningsrecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-