| 1 |
|
package org.apache.lucene.store; |
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
import java.io.IOException; |
| 20 |
|
|
| 21 |
|
|
| 22 |
|
@link |
| 23 |
|
@link |
| 24 |
|
@link |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
@see |
| 28 |
|
|
| 29 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 3 |
Complexity Density: 1.5 |
|
| 30 |
|
public class NoLockFactory extends LockFactory { |
| 31 |
|
|
| 32 |
|
|
| 33 |
|
private static NoLock singletonLock = new NoLock(); |
| 34 |
|
private static NoLockFactory singleton = new NoLockFactory(); |
| 35 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 36 |
2
|
public static NoLockFactory getNoLockFactory() {... |
| 37 |
2
|
return singleton; |
| 38 |
|
} |
| 39 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 40 |
10
|
public Lock makeLock(String lockName) {... |
| 41 |
10
|
return singletonLock; |
| 42 |
|
} |
| 43 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 44 |
2
|
public void clearAllLocks() {};... |
| 45 |
|
}; |
| 46 |
|
|
|
|
|
| 42.9% |
Uncovered Elements: 4 (7) |
Complexity: 4 |
Complexity Density: 1.33 |
|
| 47 |
|
class NoLock extends Lock { |
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 48 |
10
|
public boolean obtain() throws IOException {... |
| 49 |
10
|
return true; |
| 50 |
|
} |
| 51 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 52 |
10
|
public void release() {... |
| 53 |
|
} |
| 54 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 55 |
0
|
public boolean isLocked() {... |
| 56 |
0
|
return false; |
| 57 |
|
} |
| 58 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 59 |
0
|
public String toString() {... |
| 60 |
0
|
return "NoLock"; |
| 61 |
|
} |
| 62 |
|
} |