@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface TargetSystem
Target systems allow fine-grained control over which changes apply to which components of your distributed architecture, enabling selective execution and rollback.
Example usage:
@TargetSystem(id = "user-database")
@Change(id = "add-user-preferences", order = "2024-11-17-001", author = "backend-team")
public class AddUserPreferences {
@Apply
public void addPreferencesTable(Connection conn) {
// Create preferences table in user database
}
}
@TargetSystem(id = "analytics-database")
@Change(id = "create-metrics-view", order = "2024-11-17-002", author = "analytics-team")
public class CreateMetricsView {
@Apply
public void createView(Connection conn) {
// Create materialized view in analytics database
}
}
Change| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
id
Identifier for the target system this change applies to.
|