01: package liquibase;
02:
03: import java.util.Date;
04:
05: /**
06: * Information about the database changelog lock which allows only one instance of LiquiBase to attempt to
07: * update a database at a time. Immutable class
08: */
09: public class DatabaseChangeLogLock {
10: private final int id;
11: private final Date lockGranted;
12: private final String lockedBy;
13:
14: public DatabaseChangeLogLock(int id, Date lockGranted,
15: String lockedBy) {
16: this .id = id;
17: this .lockGranted = new Date(lockGranted.getTime());
18: this .lockedBy = lockedBy;
19: }
20:
21: public int getId() {
22: return id;
23: }
24:
25: public Date getLockGranted() {
26: return (Date) lockGranted.clone();
27: }
28:
29: public String getLockedBy() {
30: return lockedBy;
31: }
32: }
|