Code changed in jenkins
User: Patrik Johansson
Path:
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/ExternalResourceQueueTaskDispatcher.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/ReleaseRunListener.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/SelectionCriteria.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/data/ExternalResource.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/utils/resourcemanagers/DefaultExternalResourceManager.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/utils/resourcemanagers/ExternalResourceManager.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/utils/resourcemanagers/NoopExternalResourceManager.java
src/main/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/utils/resourcemanagers/ResourceMonitorExternalResourceManager.java
src/test/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/utils/NoopExternalResourceManagerHudsonTest.java
src/test/java/com/sonyericsson/jenkins/plugins/externalresource/dispatcher/utils/resourcemanagers/ExternalResourceManagerTest.java
http://jenkins-ci.org/commit/external-resource-dispatcher-plugin/b87513b074b74d2cec18945ebe76fb9106faf314
Log:
[FIXED JENKINS-17469] Clearer separation of concerns

Refactoring classses to make the concerns of each class clearer.

All state changes of an ExternalResource are now made by the
ExternalResourceManager instead of whatever object is requesting the
resource.

To make this happen, the reserve/lock/release methods have been re-written using the
Template Method Pattern, implementing the state change flow in the abstract base class
and letting sub-classes continue to implement the inner locking mechanism by calling the
abstract method reservation/locking/releasingMechanism().

A sequence diagram of the new plugin flow can be seen here:
http://www.websequencediagrams.com/cgi-bin/cdraw?lz=cGFydGljaXBhbnQgRXh0ZXJuYWxSZXNRdWV1ZVRhc2tEaXNwYXRjaGVyCgAfDFNlbGVjdGlvbkNyaXRlcmlhABENUmVsZWFzZVJ1bkxpc3RlbgAuDwBdC291cmNlTWFuYWcAUg9BdmFpbGFiaWxpdHlGaWx0ACQfCgpvcHQgV2hlbiBsb29raW5nIGZvciBleGVjdXRvcgoAgT0eLT4AXRM6IGdldACBGxBzTGlzdChub2RlKQAeNmYAgUcFRW5hYmxlZGFuZACBYQdsZSgAGjdnZXRNYXRjaGluZwCBHAkAKCQAgm4XOiByZXNlcnZlKHIAgxcHAIFcDQCDJAwAMhM6IHNldFIAOwZkKCkKZW5kAIMPC2pvYiBzdGFydHMKAIQvESAtLT4AexgAgQoIKSAgW2lmIG5vdACBHQhkXSAAgQYYIACBURMgOgCBEQ4AcxMAgX4bbG9jawCBXDpMb2NrAIF9F2ZpbmlzaGVzCgCGJhIAgXsaIHIAhl8GKCkAgWoZAIJAEgB-DG51bGwAgxwG&s=default

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to