Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from dgomezferro/master
Early stop & aborts snapshot
- Loading branch information
Showing
24 changed files
with
371 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,51 @@ | |||
package com.yahoo.omid.tso; | |||
|
|||
public class AbortedTransaction { | |||
private long startTimestamp; | |||
private long snapshot; | |||
|
|||
public AbortedTransaction(long startTimestamp, long snapshot) { | |||
super(); | |||
this.startTimestamp = startTimestamp; | |||
this.snapshot = snapshot; | |||
} | |||
|
|||
public long getStartTimestamp() { | |||
return startTimestamp; | |||
} | |||
|
|||
public void setStartTimestamp(long startTimestamp) { | |||
this.startTimestamp = startTimestamp; | |||
} | |||
|
|||
public long getSnapshot() { | |||
return snapshot; | |||
} | |||
|
|||
public void setSnapshot(long snapshot) { | |||
this.snapshot = snapshot; | |||
} | |||
|
|||
@Override | |||
public int hashCode() { | |||
final int prime = 31; | |||
int result = 1; | |||
result = prime * result + (int) (startTimestamp ^ (startTimestamp >>> 32)); | |||
return result; | |||
} | |||
|
|||
@Override | |||
public boolean equals(Object obj) { | |||
if (this == obj) | |||
return true; | |||
if (obj == null) | |||
return false; | |||
if (getClass() != obj.getClass()) | |||
return false; | |||
AbortedTransaction other = (AbortedTransaction) obj; | |||
if (startTimestamp != other.startTimestamp) | |||
return false; | |||
return true; | |||
} | |||
|
|||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.