@Override
 public void putAll(Map<? extends K, ? extends V> m) {
   wL.lock();
   try {
     super.putAll(m);
   } finally {
     wL.unlock();
   }
 }
Пример #2
0
  public static void init() {
    if (!channels.isEmpty()) // avoid duplicate inits..
    return;

    Codec codec = new Codec();

    codec.addDiscriminator(0, PacketMachine.class);
    codec.addDiscriminator(1, PacketEntity.class);
    codec.addDiscriminator(2, PacketDimInfo.class);
    codec.addDiscriminator(3, PacketSatellite.class);
    codec.addDiscriminator(4, PacketStellarInfo.class);
    codec.addDiscriminator(5, PacketItemModifcation.class);

    channels.putAll(
        NetworkRegistry.INSTANCE.newChannel(AdvancedRocketry.modId, codec, new HandlerServer()));

    // add handlers
    if (FMLCommonHandler.instance().getSide().isClient()) {
      // for the client
      FMLEmbeddedChannel channel = channels.get(Side.CLIENT);
      String codecName = channel.findChannelHandlerNameForType(Codec.class);
      channel.pipeline().addAfter(codecName, "ClientHandler", new HandlerClient());
    }
  }
 @Override
 public void reconfigure(DeviceExtension from) {
   ArchiveDeviceExtension arcdev = (ArchiveDeviceExtension) from;
   defaultCharacterSet = arcdev.defaultCharacterSet;
   fuzzyAlgorithmClass = arcdev.fuzzyAlgorithmClass;
   fuzzyStr = arcdev.fuzzyStr;
   storageID = arcdev.storageID;
   metadataStorageID = arcdev.metadataStorageID;
   seriesMetadataStorageID = arcdev.seriesMetadataStorageID;
   seriesMetadataDelay = arcdev.seriesMetadataDelay;
   seriesMetadataPollingInterval = arcdev.seriesMetadataPollingInterval;
   seriesMetadataFetchSize = arcdev.seriesMetadataFetchSize;
   purgeInstanceRecordsDelay = arcdev.purgeInstanceRecordsDelay;
   purgeInstanceRecordsPollingInterval = arcdev.purgeInstanceRecordsPollingInterval;
   purgeInstanceRecordsFetchSize = arcdev.purgeInstanceRecordsFetchSize;
   overwritePolicy = arcdev.overwritePolicy;
   showPatientInfoInSystemLog = arcdev.showPatientInfoInSystemLog;
   showPatientInfoInAuditLog = arcdev.showPatientInfoInAuditLog;
   bulkDataSpoolDirectory = arcdev.bulkDataSpoolDirectory;
   queryRetrieveViewID = arcdev.queryRetrieveViewID;
   personNameComponentOrderInsensitiveMatching =
       arcdev.personNameComponentOrderInsensitiveMatching;
   sendPendingCGet = arcdev.sendPendingCGet;
   sendPendingCMoveInterval = arcdev.sendPendingCMoveInterval;
   wadoSupportedSRClasses.clear();
   wadoSupportedSRClasses.addAll(arcdev.wadoSupportedSRClasses);
   wadoSR2HtmlTemplateURI = arcdev.wadoSR2HtmlTemplateURI;
   wadoSR2TextTemplateURI = arcdev.wadoSR2TextTemplateURI;
   patientUpdateTemplateURI = arcdev.patientUpdateTemplateURI;
   importReportTemplateURI = arcdev.importReportTemplateURI;
   scheduleProcedureTemplateURI = arcdev.scheduleProcedureTemplateURI;
   qidoMaxNumberOfResults = arcdev.qidoMaxNumberOfResults;
   queryRetrieveViewMap.clear();
   queryRetrieveViewMap.putAll(arcdev.queryRetrieveViewMap);
   mppsForwardDestinations = arcdev.mppsForwardDestinations;
   ianDestinations = arcdev.ianDestinations;
   ianDelay = arcdev.ianDelay;
   ianTimeout = arcdev.ianTimeout;
   ianOnTimeout = arcdev.ianOnTimeout;
   ianTaskPollingInterval = arcdev.ianTaskPollingInterval;
   ianTaskFetchSize = arcdev.ianTaskFetchSize;
   fallbackCMoveSCP = arcdev.fallbackCMoveSCP;
   fallbackCMoveSCPDestination = arcdev.fallbackCMoveSCPDestination;
   fallbackCMoveSCPLeadingCFindSCP = arcdev.fallbackCMoveSCPLeadingCFindSCP;
   fallbackCMoveSCPRetries = arcdev.fallbackCMoveSCPRetries;
   externalRetrieveAEDestination = arcdev.externalRetrieveAEDestination;
   alternativeCMoveSCP = arcdev.alternativeCMoveSCP;
   exportTaskPollingInterval = arcdev.exportTaskPollingInterval;
   exportTaskFetchSize = arcdev.exportTaskFetchSize;
   deleteRejectedPollingInterval = arcdev.deleteRejectedPollingInterval;
   deleteRejectedFetchSize = arcdev.deleteRejectedFetchSize;
   purgeStoragePollingInterval = arcdev.purgeStoragePollingInterval;
   purgeStorageFetchSize = arcdev.purgeStorageFetchSize;
   deleteStudyBatchSize = arcdev.deleteStudyBatchSize;
   deletePatientOnDeleteLastStudy = arcdev.deletePatientOnDeleteLastStudy;
   maxAccessTimeStaleness = arcdev.maxAccessTimeStaleness;
   aeCacheStaleTimeout = arcdev.aeCacheStaleTimeout;
   leadingCFindSCPQueryCacheStaleTimeout = arcdev.leadingCFindSCPQueryCacheStaleTimeout;
   leadingCFindSCPQueryCacheSize = arcdev.leadingCFindSCPQueryCacheSize;
   auditSpoolDirectory = arcdev.auditSpoolDirectory;
   auditPollingInterval = arcdev.auditPollingInterval;
   auditAggregateDuration = arcdev.auditAggregateDuration;
   stowSpoolDirectory = arcdev.stowSpoolDirectory;
   wadoSpoolDirectory = arcdev.wadoSpoolDirectory;
   hl7LogFilePattern = arcdev.hl7LogFilePattern;
   hl7ErrorLogFilePattern = arcdev.hl7ErrorLogFilePattern;
   purgeQueueMessagePollingInterval = arcdev.purgeQueueMessagePollingInterval;
   purgeStgCmtPollingInterval = arcdev.purgeStgCmtPollingInterval;
   purgeStgCmtCompletedDelay = arcdev.purgeStgCmtCompletedDelay;
   hideSPSWithStatusFrom = arcdev.hideSPSWithStatusFrom;
   rejectExpiredStudiesPollingInterval = arcdev.rejectExpiredStudiesPollingInterval;
   rejectExpiredStudiesPollingStartTime = arcdev.rejectExpiredStudiesPollingStartTime;
   rejectExpiredStudiesFetchSize = arcdev.rejectExpiredStudiesFetchSize;
   rejectExpiredSeriesFetchSize = arcdev.rejectExpiredSeriesFetchSize;
   rejectExpiredStudiesAETitle = arcdev.rejectExpiredStudiesAETitle;
   fallbackCMoveSCPStudyOlderThan = arcdev.fallbackCMoveSCPStudyOlderThan;
   storePermissionServiceURL = arcdev.storePermissionServiceURL;
   storePermissionServiceResponsePattern = arcdev.storePermissionServiceResponsePattern;
   storePermissionServiceExpirationDatePattern =
       arcdev.storePermissionServiceExpirationDatePattern;
   storePermissionServiceErrorCommentPattern = arcdev.storePermissionServiceErrorCommentPattern;
   storePermissionServiceErrorCodePattern = arcdev.storePermissionServiceErrorCodePattern;
   storePermissionCacheStaleTimeout = arcdev.storePermissionCacheStaleTimeout;
   storePermissionCacheSize = arcdev.storePermissionCacheSize;
   mergeMWLCacheStaleTimeout = arcdev.mergeMWLCacheStaleTimeout;
   mergeMWLCacheSize = arcdev.mergeMWLCacheSize;
   storeUpdateDBMaxRetries = arcdev.storeUpdateDBMaxRetries;
   allowRejectionForDataRetentionPolicyExpired =
       arcdev.allowRejectionForDataRetentionPolicyExpired;
   acceptMissingPatientID = arcdev.acceptMissingPatientID;
   allowDeleteStudyPermanently = arcdev.allowDeleteStudyPermanently;
   retrieveAETitles = arcdev.retrieveAETitles;
   baseRetrieveURL = arcdev.baseRetrieveURL;
   attributeFilters.clear();
   attributeFilters.putAll(arcdev.attributeFilters);
   metadataFilters.clear();
   metadataFilters.putAll(arcdev.metadataFilters);
   idGenerators.clear();
   idGenerators.putAll(arcdev.idGenerators);
   storageDescriptorMap.clear();
   storageDescriptorMap.putAll(arcdev.storageDescriptorMap);
   queueDescriptorMap.clear();
   queueDescriptorMap.putAll(arcdev.queueDescriptorMap);
   exporterDescriptorMap.clear();
   exporterDescriptorMap.putAll(arcdev.exporterDescriptorMap);
   exportRules.clear();
   exportRules.addAll(arcdev.exportRules);
   rsForwardRules.clear();
   rsForwardRules.addAll(arcdev.rsForwardRules);
   hl7ForwardRules.clear();
   hl7ForwardRules.addAll(arcdev.hl7ForwardRules);
   hl7OrderScheduledStations.clear();
   hl7OrderScheduledStations.addAll(arcdev.hl7OrderScheduledStations);
   hl7OrderSPSStatuses.clear();
   hl7OrderSPSStatuses.putAll(arcdev.hl7OrderSPSStatuses);
   compressionRules.clear();
   compressionRules.addAll(arcdev.compressionRules);
   studyRetentionPolicies.clear();
   studyRetentionPolicies.addAll(arcdev.studyRetentionPolicies);
   attributeCoercions.clear();
   attributeCoercions.addAll(arcdev.attributeCoercions);
   storeAccessControlIDRules.clear();
   storeAccessControlIDRules.addAll(arcdev.storeAccessControlIDRules);
   rejectionNoteMap.clear();
   rejectionNoteMap.putAll(arcdev.rejectionNoteMap);
 }