Project

General

Profile

« Previous | Next » 

Revision 6471

Added by Matt Jones about 13 years ago

Reverting previous @Overrides chanrge from r6470, as that is the desired
behavior under Java 1.6 -- previous versions of Java (e.g., 1.5) will not
comile with this usage of the @Overrides annotation, but the currently
supported version will. So reverting to the 1.6 convention.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
167 167
   * @throws NotImplemented
168 168
   * @throws InvalidRequest
169 169
   */
170
  //@Override
170
  @Override
171 171
  public Identifier delete(Session session, Identifier pid) 
172 172
    throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, 
173 173
    NotImplemented, InvalidRequest {
......
264 264
   * @throws InvalidSystemMetadata
265 265
   * @throws InvalidRequest
266 266
   */
267
  //@Override
267
  @Override
268 268
  public Identifier update(Session session, Identifier pid, InputStream object,
269 269
    Identifier newPid, SystemMetadata sysmeta) 
270 270
    throws InvalidToken, ServiceFailure, NotAuthorized, IdentifierNotUnique, 
......
409 409
   * @throws InsufficientResources
410 410
   * @throws InvalidRequest
411 411
   */
412
  @Override
412 413
  public boolean replicate(Session session, SystemMetadata sysmeta, 
413 414
    NodeReference sourceNode)
414 415
    throws NotImplemented, ServiceFailure, NotAuthorized, InvalidRequest,
......
474 475
   * @throws NotImplemented
475 476
   * @throws InvalidRequest
476 477
   */
478
  @Override
477 479
  public DescribeResponse describe(Session session, Identifier pid)
478 480
    throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
479 481
    NotImplemented, InvalidRequest {
......
539 541
   * @throws InvalidRequest
540 542
   * @throws NotImplemented
541 543
   */
544
  @Override
542 545
  public Checksum getChecksum(Session session, Identifier pid, String algorithm)
543 546
    throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
544 547
    InvalidRequest, NotImplemented {
......
622 625
   * @throws InvalidRequest
623 626
   * @throws NotImplemented
624 627
   */
628
  @Override
625 629
  public ObjectList listObjects(Session session, Date startTime, Date endTime,
626 630
    ObjectFormatIdentifier objectFormatId, Boolean replicaStatus, Integer start, Integer count)
627 631
    throws NotAuthorized, InvalidRequest, NotImplemented, ServiceFailure,
......
649 653
   * @throws InvalidRequest
650 654
   * @throws NotImplemented
651 655
   */
656
  @Override
652 657
  public Node getCapabilities() throws NotImplemented, NotAuthorized,
653 658
      ServiceFailure, InvalidRequest {
654 659
    
......
823 828
   * @throws InvalidRequest
824 829
   * @throws NotImplemented
825 830
   */
831
  @Override
826 832
  public MonitorList getOperationStatistics(Session session, Date startTime,
827 833
  		Date endTime, Subject requestor, Event event, ObjectFormatIdentifier formatId) 
828 834
    throws NotImplemented, ServiceFailure, NotAuthorized, InvalidRequest, 
......
875 881
   * @throws InvalidRequest
876 882
   * @throws NotImplemented
877 883
   */
884
  @Override
878 885
  public boolean ping() 
879 886
    throws NotImplemented, ServiceFailure, NotAuthorized, InvalidRequest, 
880 887
    InsufficientResources, UnsupportedType {
......
914 921
   * @throws InvalidRequest
915 922
   * @throws NotImplemented
916 923
   */
924
  @Override
917 925
  public void synchronizationFailed(Session session, SynchronizationFailed syncFailed)
918 926
      throws NotImplemented, ServiceFailure, NotAuthorized, InvalidRequest {
919 927

  
......
943 951
  }
944 952

  
945 953
  /**
946
   * Essentially a get() but with different logging behavior and different access control.
954
   * Essentially a get() but with different logging behavior
947 955
   */
956
	@Override
948 957
  public InputStream getReplica(Session session, Identifier pid)
949 958
    throws InvalidRequest, InvalidToken, NotAuthorized, NotImplemented,
950 959
    ServiceFailure, NotFound {
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
119 119
   * @throws InvalidRequest
120 120
   * 
121 121
   */
122
  @Override
122 123
  public boolean setReplicationPolicy(Session session, Identifier pid,
123 124
    ReplicationPolicy policy) 
124 125
    throws NotImplemented, NotFound, NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken {
......
174 175
   * @throws NotFound
175 176
   * 
176 177
   */
178
  @Override
177 179
  public boolean setReplicationStatus(Session session, Identifier pid,
178 180
    NodeReference targetNode, ReplicationStatus status) 
179 181
    throws ServiceFailure, NotImplemented, InvalidToken, NotAuthorized, 
......
235 237
   * @throws InvalidRequest
236 238
   * @throws NotImplemented
237 239
   */
240
  @Override
238 241
  public boolean assertRelation(Session session, Identifier pidOfSubject, 
239 242
    String relationship, Identifier pidOfObject) 
240 243
    throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, 
......
299 302
   * @throws InvalidRequest
300 303
   * @throws NotImplemented
301 304
   */
305
  @Override
302 306
  public Checksum getChecksum(Session session, Identifier pid)
303 307
    throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, 
304 308
    InvalidRequest, NotImplemented {
......
332 336
   * @throws NotFound
333 337
   * @throws NotImplemented
334 338
   */
339
  @Override
335 340
  public ObjectLocationList resolve(Session session, Identifier pid)
336 341
    throws InvalidRequest, InvalidToken, ServiceFailure, NotAuthorized,
337 342
    NotFound, NotImplemented {
......
357 362
   * @throws InvalidRequest
358 363
   * @throws NotImplemented
359 364
   */
365
  @Override
360 366
  public ObjectList search(Session session, String queryType, String query)
361 367
    throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest,
362 368
    NotImplemented {
......
444 450
   * @throws InsufficientResources
445 451
   * @throws NotImplemented
446 452
   */
453
  @Override
447 454
  public ObjectFormat getFormat(ObjectFormatIdentifier fmtid)
448 455
    throws InvalidRequest, ServiceFailure, NotFound, InsufficientResources,
449 456
    NotImplemented {
......
465 472
   * @throws NotFound
466 473
   * @throws InsufficientResources
467 474
   */
475
  @Override
468 476
  public ObjectFormatList listFormats() 
469 477
    throws InvalidRequest, ServiceFailure, NotFound, InsufficientResources, 
470 478
    NotImplemented {
......
480 488
   * @throws ServiceFailure
481 489
   * @throws NotImplemented
482 490
   */
491
  @Override
483 492
  public NodeList listNodes() 
484 493
    throws NotImplemented, ServiceFailure {
485 494

  
......
502 511
   * @throws InvalidRequest
503 512
   * @throws InvalidSystemMetadata
504 513
   */
514
  @Override
505 515
  public Identifier registerSystemMetadata(Session session, Identifier guid,
506 516
    SystemMetadata sysmeta) 
507 517
    throws NotImplemented, NotAuthorized, ServiceFailure, InvalidRequest, 
......
567 577
   * @throws InvalidSystemMetadata
568 578
   * @throws NotFound
569 579
   */
580
  @Override
570 581
  public boolean updateSystemMetadata(Session session, Identifier guid,
571 582
    SystemMetadata sysmeta) 
572 583
    throws NotImplemented, NotAuthorized, ServiceFailure, InvalidRequest, 
......
642 653
   * @throws IdentifierNotUnique
643 654
   * @throws NotImplemented
644 655
   */
656
  @Override
645 657
  public boolean reserveIdentifier(Session session, Identifier pid)
646 658
  throws InvalidToken, ServiceFailure,
647 659
        NotAuthorized, IdentifierNotUnique, NotImplemented, InvalidRequest {
......
649 661
    throw new NotImplemented("4191", "reserveIdentifier not implemented on this node");
650 662
  }
651 663
  
664
  @Override
652 665
  public Identifier generateIdentifier(Session session, String scheme, String fragment)
653 666
  throws InvalidToken, ServiceFailure,
654 667
        NotAuthorized, NotImplemented, InvalidRequest {
......
672 685
   * @throws NotImplemented
673 686
   */
674 687

  
688
  @Override
675 689
  public boolean hasReservation(Session session, Identifier pid) 
676 690
      throws InvalidToken, ServiceFailure, NotFound, NotAuthorized, IdentifierNotUnique, 
677 691
      NotImplemented, InvalidRequest {
......
696 710
   * @throws NotImplemented
697 711
   * @throws InvalidRequest
698 712
   */  
713
  @Override
699 714
  public Identifier setOwner(Session session, Identifier pid, Subject userId)
700 715
    throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
701 716
    NotImplemented, InvalidRequest {
......
752 767
   * @throws InvalidRequest
753 768
   * @throws NotFound
754 769
   */
770
  @Override
755 771
  public boolean isNodeAuthorized(Session originatingNodeSession, 
756 772
    Subject targetNodeSubject, Identifier pid, Permission replicatePermission) 
757 773
    throws NotImplemented, NotAuthorized, InvalidToken, ServiceFailure, 
src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java
244 244
  /**
245 245
   * Listen for new Hazelcast member events
246 246
   */
247
  @Override
247 248
  public void instanceCreated(InstanceEvent event) {
248 249
    logMetacat.info("New Hazelcast instance created: " +
249 250
      event.getInstance().getId() + ", " +
......
251 252
    
252 253
  }
253 254

  
255
  @Override
254 256
  public void instanceDestroyed(InstanceEvent event) {
255 257
    logMetacat.info("Hazelcast instance removed: " +
256 258
        event.getInstance().getId() + ", " +
......
261 263
  /**
262 264
   * Refresh the Hazelcast service by restarting it
263 265
   */
266
  @Override
264 267
  protected void doRefresh() throws ServiceException {
265 268

  
266 269
    // TODO: verify that the correct config file is still used
......
275 278
	 * 
276 279
	 * @param event - The EntryEvent that occurred
277 280
	 */
281
	@Override
278 282
	public void entryAdded(EntryEvent<Identifier, SystemMetadata> event) {
279 283
		// handle as update - that method will create if necessary
280 284
		entryUpdated(event);
......
287 291
	 * 
288 292
	 * @param event - The EntryEvent that occurred
289 293
	 */
294
	@Override
290 295
	public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {
291 296
	  // nothing to do, entries are still in the backing store
292 297
	  
......
299 304
	 * 
300 305
	 * @param event - The EntryEvent that occurred
301 306
	 */
307
	@Override
302 308
	public void entryRemoved(EntryEvent<Identifier, SystemMetadata> event) {
303 309
	  // we don't remove objects
304 310
	  
......
311 317
	 * 
312 318
	 * @param event - The EntryEvent that occurred
313 319
	 */
320
	@Override
314 321
	public void entryUpdated(EntryEvent<Identifier, SystemMetadata> event) {
315 322
	
316 323
			logMetacat.debug("Entry added/updated to System Metadata map: " + event.getKey().getValue());
src/edu/ucsb/nceas/metacat/dataone/hazelcast/ObjectPathMap.java
1 1
package edu.ucsb.nceas.metacat.dataone.hazelcast;
2 2

  
3 3
import java.util.Collection;
4
import java.util.Collections;
5
import java.util.HashSet;
4 6
import java.util.Hashtable;
7
import java.util.List;
5 8
import java.util.Map;
6 9
import java.util.Set;
7 10

  
......
74 77
	 *  document on the local filesystem.  Returns null if it can't 
75 78
	 *  create the path. 
76 79
	 */
80
	@Override
77 81
	public String load(String key) 
78 82
	{
79 83

  
......
96 100
	 *  mappings for all Identifiers in the parameters.  Any Identifier not found
97 101
	 *  is not included in the resulting map.
98 102
	 */
103
	@Override
99 104
	public Map<String, String> loadAll(Collection<String> identifiers) {
100 105
		
101 106
		
......
122 127
	 * (Hazelcast allows avoiding pre-loading by returning NULL, so will
123 128
	 * do this to avoid pre-loading a very long list unnecessarily)
124 129
	 */
130
	@Override
125 131
	public Set<String> loadAllKeys() 
126 132
	{
127 133
		return null;
src/edu/ucsb/nceas/metacat/dataone/hazelcast/SystemMetadataMap.java
24 24
 */
25 25
public class SystemMetadataMap implements MapStore<Identifier, SystemMetadata>, MapLoader<Identifier, SystemMetadata> {
26 26

  
27
	@Override
27 28
	public void delete(Identifier arg0) {
28 29
		// we do not delete system metadata
29 30
	}
30 31

  
32
	@Override
31 33
	public void deleteAll(Collection<Identifier> arg0) {
32 34
		// we do not delete system metadata	
33 35
	}
34 36

  
37
	@Override
35 38
	public void store(Identifier pid, SystemMetadata sm) {
36 39
		try {
37 40
			//System.out.println("Storing System Metadata to store: " + pid.getValue());
......
45 48
		}
46 49
	}
47 50

  
51
	@Override
48 52
	public void storeAll(Map<Identifier, SystemMetadata> map) {
49 53
		for (Identifier key: map.keySet()) {
50 54
			store(key, map.get(key));
51 55
		}
52 56
	}
53 57

  
58
	@Override
54 59
	public SystemMetadata load(Identifier pid) {
55 60
		SystemMetadata sm = null;
56 61
		try {
......
62 67
		return sm;
63 68
	}
64 69

  
70
	@Override
65 71
	public Map<Identifier, SystemMetadata> loadAll(Collection<Identifier> keys) {
66 72
		Map<Identifier, SystemMetadata> map = new HashMap<Identifier, SystemMetadata>();
67 73
		for (Identifier key: keys) {
......
71 77
		return map;
72 78
	}
73 79

  
80
	@Override
74 81
	public Set<Identifier> loadAllKeys() {
75 82
		Set<Identifier> pids = new HashSet<Identifier>();
76 83
		try {

Also available in: Unified diff