MCPcopy Create free account
hub / github.com/BaseXdb/basex / acquire

Method acquire

basex-core/src/main/java/org/basex/core/locks/Locking.java:84–93  ·  view source on GitHub ↗

Acquires locks for the specified job. @param job job to be queued @param ctx database context of client

(final Job job, final Context ctx)

Source from the content-addressed store, hash-verified

82 * @param ctx database context of client
83 */
84 public void acquire(final Job job, final Context ctx) {
85 // collect lock strings
86 job.addLocks();
87 // prepare lock strings and acquire locks
88 try {
89 acquire(job.jc().locks.finish(ctx));
90 } catch(final InterruptedException ex) {
91 throw Util.notExpected("Thread was interrupted: %", ex);
92 }
93 }
94
95 /**
96 * Puts read and write locks for the specified lock lists.

Callers 2

runMethod · 0.45
registerMethod · 0.45

Calls 15

notExpectedMethod · 0.95
lockingMethod · 0.95
globalMethod · 0.95
localMethod · 0.95
sizeMethod · 0.95
getMethod · 0.95
pinMethod · 0.95
jcMethod · 0.80
writeLockMethod · 0.80
readLockMethod · 0.80
addLocksMethod · 0.45
finishMethod · 0.45

Tested by 1

runMethod · 0.36