Coverage Report - liquibase.lockservice.DatabaseChangeLogLock
 
Classes in this File Line Coverage Branch Coverage Complexity
DatabaseChangeLogLock
100%
8/8
N/A
1
 
 1  
 package liquibase.lockservice;
 2  
 
 3  
 import java.util.Date;
 4  
 
 5  
 /**
 6  
  * Information about the database changelog lock which allows only one instance of Liquibase to attempt to update a
 7  
  * database at a time. Immutable class
 8  
  */
 9  
 public class DatabaseChangeLogLock {
 10  
     private final int id;
 11  
     private final Date lockGranted;
 12  
     private final String lockedBy;
 13  
 
 14  2
     public DatabaseChangeLogLock(int id, Date lockGranted, String lockedBy) {
 15  2
         this.id = id;
 16  2
         this.lockGranted = new Date(lockGranted.getTime());
 17  2
         this.lockedBy = lockedBy;
 18  2
     }
 19  
 
 20  
     public int getId() {
 21  1
         return id;
 22  
     }
 23  
 
 24  
     public Date getLockGranted() {
 25  2
         return (Date) lockGranted.clone();
 26  
     }
 27  
 
 28  
     public String getLockedBy() {
 29  2
         return lockedBy;
 30  
     }
 31  
 }