Project

General

Profile

« Previous | Next » 

Revision 6859

Use Lock instead of ILock to be consistent across classes.

View differences:

src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
29 29
import java.util.Date;
30 30
import java.util.List;
31 31
import java.util.Set;
32
import java.util.concurrent.locks.Lock;
32 33

  
33 34
import javax.servlet.http.HttpServletRequest;
34 35

  
......
71 72
import org.dataone.service.types.v1.Subject;
72 73
import org.dataone.service.types.v1.SystemMetadata;
73 74

  
74
import com.hazelcast.core.ILock;
75

  
76 75
import edu.ucsb.nceas.metacat.EventLog;
77 76
import edu.ucsb.nceas.metacat.IdentifierManager;
78 77
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService;
......
128 127
      InvalidRequest, InvalidToken {
129 128
      
130 129
      // The lock to be used for this identifier
131
      ILock lock = null;
130
      Lock lock = null;
132 131
      
133 132
      // get the subject
134 133
      Subject subject = session.getSubject();
......
215 214
      InvalidRequest, NotFound {
216 215
      
217 216
      // The lock to be used for this identifier
218
      ILock lock = null;
217
      Lock lock = null;
219 218
      
220 219
      boolean allowed = false;
221 220
      int replicaEntryIndex = -1;
......
371 370
    InvalidRequest, NotImplemented {
372 371
    
373 372
    // The lock to be used for thyis identifier
374
    ILock lock = null;
373
    Lock lock = null;
375 374

  
376 375
    boolean asserted = false;
377 376
        
......
452 451
    NotImplemented {
453 452
        
454 453
    // The lock to be used for thyis identifier
455
    ILock lock = null;
454
    Lock lock = null;
456 455
    
457 456
    if (!isAuthorized(session, pid, Permission.READ)) {
458 457
        throw new NotAuthorized("1400", Permission.READ + " not allowed on " + pid.getValue());  
......
665 664
      InvalidSystemMetadata {
666 665

  
667 666
      // The lock to be used for this identifier
668
      ILock lock = null;
667
      Lock lock = null;
669 668

  
670 669
      // TODO: control who can call this?
671 670
      if (session == null) {
......
810 809
      NotImplemented, InvalidRequest {
811 810
      
812 811
      // The lock to be used for this identifier
813
      ILock lock = null;
812
      Lock lock = null;
814 813

  
815 814
      // get the subject
816 815
      Subject subject = session.getSubject();
......
892 891
    NotFound, InvalidRequest {
893 892

  
894 893
    // The lock to be used for this identifier
895
    ILock lock = null;
894
    Lock lock = null;
896 895
    
897 896
    boolean isAllowed = false;
898 897
    SystemMetadata sysmeta = null;
......
1020 1019
      
1021 1020
      
1022 1021
      // The lock to be used for this identifier
1023
      ILock lock = null;
1022
      Lock lock = null;
1024 1023
      
1025 1024
      try {
1026 1025
        // are we allowed?
......
1096 1095
      NotImplemented, InvalidRequest {
1097 1096
      
1098 1097
      // The lock to be used for this identifier
1099
      ILock lock = null;
1098
      Lock lock = null;
1100 1099
      
1101 1100
      boolean success = false;
1102 1101
      
......
1183 1182
      NotFound {
1184 1183
      
1185 1184
      // The lock to be used for this identifier
1186
      ILock lock = null;
1185
      Lock lock = null;
1187 1186
      
1188 1187
      // get the subject
1189 1188
      Subject subject = session.getSubject();
src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java
29 29
import java.io.FileNotFoundException;
30 30
import java.util.Collection;
31 31
import java.util.Date;
32
import java.util.concurrent.locks.Lock;
32 33

  
33 34
import org.apache.log4j.Logger;
34 35
import org.dataone.service.types.v1.Identifier;
......
36 37
import org.dataone.service.types.v1.NodeReference;
37 38
import org.dataone.service.types.v1.SystemMetadata;
38 39

  
39
import com.hazelcast.client.HazelcastClient;
40 40
import com.hazelcast.config.Config;
41 41
import com.hazelcast.config.FileSystemXmlConfig;
42 42
import com.hazelcast.core.EntryEvent;
43 43
import com.hazelcast.core.EntryListener;
44 44
import com.hazelcast.core.Hazelcast;
45 45
import com.hazelcast.core.HazelcastInstance;
46
import com.hazelcast.core.ILock;
47 46
import com.hazelcast.core.IMap;
48 47
import com.hazelcast.core.InstanceEvent;
49 48
import com.hazelcast.core.InstanceListener;
......
241 240
	
242 241
  }
243 242

  
244
  public ILock getLock(String identifier) {
243
  public Lock getLock(String identifier) {
245 244
    
246
    ILock lock = null;
245
    Lock lock = null;
247 246
    
248 247
    try {
249 248
        lock = getInstance().getHazelcastInstance().getLock(identifier);

Also available in: Unified diff