dCache/dcache — pull request #170 by gbehrmann (2013-09-07 08:15:39+00:00)
Title: srm: Optimize Job loading logic

Addresses performance issues in code to read SRM requests from the
SRM database.

The Job class has a static method for retrieving Jobs by id. The method
is unaware of the Job type though, and thus has to use trial and error
to find the right JobStorage from which to load the request.

This patch refines the logic such that the method makes use of a class
parameter to reduce the number of JobStorages to probe.

A subsequent patch will refine callers of the above method to supply
a more narrow type than is currently the case.

Target: trunk
Require-notes: yes
Require-book: no
Request: 2.7
Request: 2.6
Acked-by: Paul Millar
Patch: http://rb.dcache.org/r/5917/
(cherry picked from commit 406f34bfa022dab24eb2db8300f4fbb130585973)