Commit graph

437 commits

Author SHA1 Message Date
Greg Burd
b1e333009c Don't merge in keys with null values, JCache doesn't support null values. 2018-03-01 05:23:43 -07:00
Greg Burd
ca6afc326c Qualify index names with their table name. 2018-02-28 06:48:30 -05:00
Greg Burd
af4156079d Formatting and fixes to use MapCache in the UOW. 2018-02-10 12:32:54 -05:00
Greg Burd
b023ec359b Moving toward javax.cache.Cache-based UOW cache API. 2018-02-09 21:55:23 -05:00
Greg Burd
76b603f3d3 Move the Guava JCache provider into the test targets only, don't assume a CacheManager instance exists. 2018-02-08 14:46:31 -05:00
Greg Burd
d69d8a3b1e Finish first steps of JCache integration, UnitOfWork statement cache now merges into available JCache at commit. 2018-02-08 10:09:23 -05:00
Greg Burd
6858cf6f48 Integrate JCache for cached objects outside of a UnitOfWork. 2018-02-07 18:41:39 -05:00
5215749de1
Merge pull request #1 from onshape/pbeaman/remove-jamm-0.2.5-dependency
Remove test-scope dependency on jamm-0.2.5 because it conflicts with …
2018-01-27 06:41:46 -05:00
pbeaman
2299939be3 Remove test-scope dependency on jamm-0.2.5 because it conflicts with a later version and causes NoSuchMethodError when running unit tests in Eclipse 2018-01-26 10:42:13 -05:00
Greg Burd
0ddacec354 Removing Gradle files until switch is complete. 2018-01-25 16:45:13 -05:00
Greg Burd
287e1a5b8b Use DataStax/Cassandra timestamp generator. 2018-01-25 14:21:21 -05:00
Greg Burd
8b9d582fa5 Mutation only needs to be different and can occur even when current is null. 2018-01-25 12:57:37 -05:00
Greg Burd
96a8476fd8 Null values have no keys in the map, so this test fails. In most casses we're here after we resolve a getter so we know this key is valid. Skip the check. 2018-01-25 12:41:13 -05:00
Greg Burd
f168b33f6a Formatting. 2018-01-25 11:30:41 -05:00
Greg Burd
11de7015c2 Change mutate on drafts to be a bit faster. 2018-01-25 11:26:12 -05:00
Greg Burd
f9b1563bdd Ensure there is a batch. 2018-01-24 16:11:44 -05:00
Greg Burd
e2f45f82c9 Fix logged batch syntax and timestamp logic. 2018-01-24 14:33:37 -05:00
Greg Burd
27dd9a4eff Include the post commit/abort function execution time that happens within/associated-with the scope of a UOW. Fix reset method to check both maps for updates. 2018-01-24 09:28:19 -05:00
Greg Burd
26f41dab75 Add notion of statement cache to UnitOfWork. Ignore call to useKeyspace when session isn't valid. 2018-01-17 12:38:33 -05:00
Greg Burd
1da822ce57 Fix build. Change scripts to use /usr/bin/env so that they work on NiXOS. Revert abort() logic. 2018-01-16 13:10:12 -05:00
Greg Burd
1ef50ae179 Allow an init path that doesn't require a non-null Cassandra/DataStax session/cluster context. 2018-01-16 11:59:51 -05:00
Greg Burd
26c67e391a Review related fixes. 2018-01-15 11:28:04 -05:00
Greg Burd
3554b7ecb5 Add isDone() method on UnitOfWork. 2018-01-14 12:51:49 -05:00
Greg Burd
7b4e46431f Update DataStax driver version. 2017-12-14 10:19:38 -05:00
Greg Burd
60b040e7a9 Always start the timer. 2017-12-11 16:04:28 -05:00
Greg Burd
7a470bd5d7 Formatting. 2017-11-15 22:39:50 -05:00
Greg Burd
0827291253 Spoil futures not completed before an abort/commit of the UOW they belong too. Track read set for Entity/Drafted model objects. 2017-11-15 13:56:03 -05:00
Greg Burd
50f656bc8a Fix commit.andThen() logic. 2017-11-15 09:16:15 -05:00
Greg Burd
9df97b3e44 WIP: commit.exceptionally() is working but somehow in the process I broke commit.andThen(). 2017-11-14 22:37:37 -05:00
Greg Burd
33b4b35912 Formatting. 2017-11-14 15:42:16 -05:00
Greg Burd
1eccb631f3 Fix logic that was failing to cache results on cache miss. 2017-11-14 15:26:16 -05:00
Greg Burd
e932d0dcf2 Check to ensure value not null. 2017-11-14 10:06:13 -05:00
Greg Burd
618a7ea380 Draft instances map is mutable and so are collection values inside the map, this makes the UPDATE logic straight forward when mutating in-cache draft objects. Also, fix one or two logic bugs with isAssignableFrom(). 2017-11-14 09:55:03 -05:00
Greg Burd
7a56059036 Fix misuse of Drafted interface in tests. WIP fixing use of immutable collections in UPDATE/draft logic. 2017-11-13 15:55:24 -05:00
Greg Burd
33d2459538 Sometimes there are no filters. 2017-11-13 11:01:30 -05:00
Greg Burd
a63a1be4b6 Paranoia. 2017-11-13 10:47:48 -05:00
Greg Burd
d30361538c Operations now default to non-idempotent unless explictly set in the statement or if they contain fields that are idempotent (e.g. @Column(idempotent=true) or part of the primary key for the row). 2017-11-13 10:36:16 -05:00
Greg Burd
a993af6c29 Enable toggle for showing values in logged CQL statements. Default to true. 2017-11-12 22:32:58 -05:00
Greg Burd
39a8643103 Fix a few things. 2017-11-12 21:37:59 -05:00
Greg Burd
c025dc35a7 Formatting. 2017-11-12 20:14:31 -05:00
Greg Burd
d19a9c741d Fixing a few corners of caching when using drafted entity objects. Working out kinks in merge logic for entity instances in UOWs. 2017-11-10 22:48:40 -05:00
Greg Burd
6ff188f241 Move statement logging into Operation, cover special case for batches. Cleanup UOW commit logging a bit. 2017-11-09 15:03:30 -05:00
Greg Burd
2f0801d36f Fix test to see if select is of Fun<?> type. 2017-11-09 13:32:16 -05:00
Greg Burd
b4dca9c710 finish up batch feature for now 2017-11-08 21:11:58 -05:00
Greg Burd
41e5d8c1e5 wip: working on batch update times. 2017-11-08 15:40:56 -05:00
Greg Burd
5570a97dff Improved support for batched statements. 2017-11-08 13:50:39 -05:00
Greg Burd
a198989a76 Cleanup. 2017-11-07 23:01:43 -05:00
Greg Burd
eb22e3c72e Added batch() to perform mutations as a batch at the commit of a unit of work. Lots of fixes. 2017-11-07 21:23:33 -05:00
Greg Burd
a79e7dacf1 Cache data from MaterializedViews under their parent name. Add some relationship constraints that can decorate getters in model classes and be used in some cases to better cache data. 2017-11-06 13:49:34 -05:00
Greg Burd
fe47531984 Formatting. 2017-11-03 13:32:57 -04:00