aboutsummaryrefslogtreecommitdiffstats
path: root/feature-distributed-locking/src
AgeCommit message (Collapse)AuthorFilesLines
2018-09-13Fix checkstyle for features submodules.Pamela Dragosh6-494/+525
These are the remaining submodules that have checkstyle. Pretty clean compile after this. There were a couple of sonar fixes in there also. Issue-ID: POLICY-882 Change-Id: I8191ea1aa261f4a7b9d3d21c108572fd31db1b8c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-07-18Deny subsequent lock()Jim Hahn2-4/+9
This is the final step of separating the lock "refresh" operation from the original "lock" operation. This step entails rejecting subsequent "lock" requests, even by the same owner, when a resource is already locked; "refresh" should now be used, instead, to extend a lock. Modified comments to indicate that the lock can only be extended using "refresh". Change-Id: I406cf60c076dbce87afbd94fb301732359dbd2db Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-07-16Distinguish lock from refreshJim Hahn3-0/+75
This is the first step of separating the lock "refresh" operation from the original "lock" operation. This step entails adding the refresh() method to both the default and the feature-distriubted locking mechanisms. Change method call, in junit test, from lock to refresh. Change branch name in git review. Change-Id: I506de7a96cb3ee786839aca04ad67cdd7378832c Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-29Use DB time instead of jvm timeJim Hahn5-29/+65
Modified distributed locking code to use the DB time (i.e., "now()") when determining expiration times of locks. This will eliminate concerns that may arise from different timestamps on different JVMs. As part of the change, the expirationTime column was changed from BIGINT to TIMESTAMP. Rename 1810 sql scripts to 1811, to match release date. Change-Id: Ibfb15742f447133b001e4340027657ac202864a6 Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-27Add time limit to locking facilityJim Hahn6-305/+64
Modified the locking facility to add a time limit and remove the callback parameter. This affected both the default facility as well as the distributed locking feature. It will also require a change to the rules for Closed Loop. Changed testUnlock() to try locking with a different owner. Default feature API should be OPER_UNHANDLED. Put a few things back so-as not to break the drools-applications build. They can be removed once drools-applications is updated. Fix newlines in API java. Change-Id: I3ed7835cac6a582493a9bc8f6d1d4f3e6cb6289e Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-25Use connection pooling for lockingJim Hahn3-30/+66
Modified distributed locking to use connection pooling. Add comment for new dataSource parameter. Change-Id: I5dc33605797f95072af9b6911a468457f6fd9f3d Issue-ID: POLICY-910 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-18Add setXxx methods for @Property annotationJim Hahn1-41/+70
We'll be modifying the PropertyConfiguration class so that, instead of directly setting values in private fields, it will use public setXxx methods. Consequently, we have to add the setXxx methods to the PropertyConfiguration subclasses so that they're available when the superclass is modified policy/common. Change-Id: Idff9942eabec182670cbb427b960f6308a2ca30c Issue-ID: POLICY-906 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-14automatic upgrade/downgrade features dbJorge Hernandez2-0/+52
add enable and disable scripts to the feature-distributed-locking to upgrade/downgrade their databases when these features are enabled or disabled. Change-Id: Iff9368c915f6da7f7c75d9a5a20ffe27e290e7d3 Issue-ID: POLICY-788 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-05-09Change pooling property namev1.2.1Jim Hahn1-4/+4
Removed "AMSTERDAM_" prefix from pooling topic property name. Added feature-specific conf file with pooling topic property. Enabled distributed locking DB properties. Change distributed locking DB name to "pooling" to match the code. Add default value to feature-specific conf file. Change "_" in default topic name to "-". Change-Id: I53de51787694e5920dc9ced07b5a9ac60bb63e45 Issue-ID: POLICY-782 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-14Sonar cleanupMagnusen, Drew (dm741q)1-1/+9
Sonar cleanup for distributed-locking Issue-ID: POLICY-728 Change-Id: I52523a0149436805509706a4a732d1da8a1b4511 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2018-04-12Sonar fixes for policy-core locksJim Hahn2-23/+24
Made a number of changes to the locking code in policy-core, to address sonar issues. This entaileed changing some of the Lock API methods to return OperResult instead of Boolean. Updated distributed locking with the new API return types. Simplified Thread creation using functional methods. Change-Id: If32bf7a435d2aedb969de1b77c7e7e27e110ecb0 Issue-ID: POLICY-728 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-05Distributed-locking feature sonar cleanupMagnusen, Drew (dm741q)3-42/+44
Code cleanup and some refactoring to resolve sonar issues. Issue-ID: POLICY-728 Change-Id: I19051dcc8e1cec293d5d7104e63239fc2b89071e Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2018-04-04Small modification to resolve junit failuresMagnusen, Drew (dm741q)4-13/+75
Added protected method to Heartbeat class that allowed for the passing of a CountDown latch. This will resolve the timing-related junit failures in Jenkins environment. Issue-ID: POLICY-729 Change-Id: I3d2d8bddfb6d9f82be54a2f13bdcd7e1fc65a286 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2018-04-03Implementation of distributed locking featureMagnusen, Drew (dm741q)14-0/+1066
This feature is a very basic implementation of a distributed locking system. Issue-ID: POLICY-699 Change-Id: I012fd37926ccbbdd87a3e4acb2788b53680115f0 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>