-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addTransaction-removeTransaction #1338
Merged
aklish
merged 70 commits into
yahoo:elide-5.x
from
Rkr1992:TANDS-19169-addTransaction-removeTransaction
May 28, 2020
Merged
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
47fc404
TANDS-19169
a574c9a
TANDS-19169
489f34a
TANDS-19169
18c0ea9
TANDS-19169
863b908
TANDS-19169
fe13372
TANDS-19169
f371289
TANDS-19169
fb5a5f9
TANDS-19169
536fd85
TANDS-19169
1080b23
TANDS-19169
d5fcfd2
TANDS-19169
c294b2e
TANDS-19169
76c32b0
TANDS-19169
4da0e0f
TANDS-19169
05bc1f9
TANDS-19169
b86a89a
TANDS-19169
8a63316
TANDS-19169
a4e13c1
TANDS-19169
8c67f5b
TANDS-19169
195a159
TANDS-19169
57a8d8a
TANDS-19169
ba25bb1
TANDS-19169
fcfdcb6
TANDS-19169-changing-CVSS-score
1558da4
addTransaction-removeTransaction
214e16d
addTransaction-removeTransaction
830f71c
addTransaction-removeTransaction
550e456
addTransaction-removeTransaction
947fc4a
addTransaction-removeTransaction
15d7f91
addTransaction-removeTransaction
1acc419
addressing-comments
c04c053
addressing-comments
cd110d6
addressing-comments
5461fdc
addressing-comments
fc7c63e
addressing-comments
6669c9e
addressing-comments
5fd1f6e
addressing-comments
8caa043
addressing-comments
53966a2
addressing-comments
4b384ab
making DataStore an abstract class
c5ddbb6
making DataStore an abstract class
9ee68ed
fixing bugs
d9689b8
fixing bugs
6de50df
fixing bugs
716e198
fixing bugs
959808a
fixing bugs
ed6d8e3
fixing bugs
b306a0b
fixing bugs
2091e66
fixing bugs
1a564e4
fixing bugs
e899393
fixing bugs
e1e1ee0
fixing bugs
5442e4d
fixing bugs
a9760c4
adding-transaction-id to transaction implementations
2152ee0
adding-transaction-id to transaction implementations
dd022c1
adding-transaction-id to transaction implementations
8e7794c
adding-transaction-id to transaction implementations
c027cbd
fixing bugs
862bbe5
fixing bugs
862dd9c
fixing bugs
c737e1c
fixing bugs
da89038
fixing bugs
a4ba910
fixing bugs
89be875
fixing bugs
e5016c6
fixing bugs
9a41c0c
fixing bugs
11c2708
fixing bugs
52b4c61
addressing comments
3c5cdcd
addressing comments
8e73ca6
addressing comments
c10cfd4
fixing bugs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
import java.io.Serializable; | ||
import java.util.Iterator; | ||
import java.util.Set; | ||
|
||
import java.util.UUID; | ||
/** | ||
* Wraps the Database Transaction type. | ||
*/ | ||
|
@@ -31,7 +31,6 @@ public enum FeatureSupport { | |
PARTIAL, | ||
NONE | ||
} | ||
|
||
/** | ||
* Save the updated object. | ||
* | ||
|
@@ -229,7 +228,7 @@ default Object getAttribute(Object entity, | |
* @param entity - The object which owns the attribute. | ||
* @param attribute - the attribute to set. | ||
* @param scope - contains request level metadata. | ||
*/ | ||
*/ | ||
default void setAttribute(Object entity, | ||
Attribute attribute, | ||
RequestScope scope) { | ||
|
@@ -263,4 +262,9 @@ default boolean supportsSorting(Class<?> entityClass, Sorting sorting) { | |
default boolean supportsPagination(Class<?> entityClass, FilterExpression expression) { | ||
return true; | ||
} | ||
/** | ||
* Transaction ID for each transaction | ||
* @return UUID id | ||
*/ | ||
UUID getRequestId(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs javadoc. |
||
} |
22 changes: 22 additions & 0 deletions
22
elide-core/src/main/java/com/yahoo/elide/core/DataStoreTransactionImplementation.java
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2020, Yahoo Inc. | ||
* Licensed under the Apache License, Version 2.0 | ||
* See LICENSE file in project root for terms. | ||
*/ | ||
package com.yahoo.elide.core; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.UUID; | ||
|
||
/** | ||
* Data Store Transaction Implementation to return transaction id | ||
*/ | ||
public abstract class DataStoreTransactionImplementation implements DataStoreTransaction { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class needs javadoc. |
||
@Getter private final UUID requestId = UUID.randomUUID(); | ||
|
||
@Override | ||
public UUID getRequestId() { | ||
return requestId; | ||
} | ||
} |
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
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
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
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are storing requestId as a string in requestScope. Can we do the same here? or is there an advantage to storing it like this?
https://github.com/yahoo/elide/pull/1331/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using it as a key in a Map so I guess we can store it either way