/** * Creates an instance of this type using the default constructor. It is a generic factory method. * @return A new instance of this type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new org.ccsds.moims.mo.com.archive.structures.ArchiveQuery(); }
/** * Creates an instance of the source type using the default constructor. It is a generic factory method. * @return A new instance of the source type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new org.ccsds.moims.mo.com.archive.structures.ArchiveQuery(); }
@Override public void retrieveRange(FineTime from, FineTime until, ObjectTypeList objectTypes, Identifier compression, RetrieveRangeInteraction interaction) throws MALInteractionException, MALException { final Dispatcher dispatcher = new Dispatcher(interaction); long interactionTicket = interaction.getInteraction().getMessageHeader().getTransactionId(); dispatchers.put(interactionTicket, dispatcher); lastSync.set(HelperTime.getTimestamp().getValue()); interaction.sendAcknowledgement(interactionTicket); Runnable processQueriedObjs = dispatcher.getProcessingRunnable(); Runnable flushProcessedObjs = dispatcher.getFlushingRunnable(); executor.execute(processQueriedObjs); executor.execute(flushProcessedObjs); ArrayList<COMObjectEntity> perObjs; for (int i = 0; i < objectTypes.size(); i++) { ArchiveQuery archiveQuery = new ArchiveQuery(); archiveQuery.setStartTime(from); archiveQuery.setEndTime(until); archiveQuery.setDomain(null); archiveQuery.setNetwork(null); archiveQuery.setProvider(null); archiveQuery.setRelated(new Long(0)); archiveQuery.setSource(null); archiveQuery.setSortFieldName(null); perObjs = manager.queryCOMObjectEntity(objectTypes.get(i), archiveQuery, null); dispatcher.addObjects(perObjs); } dispatcher.setQueriesAreDone(true); Logger.getLogger(ArchiveSyncProviderServiceImpl.class.getName()).log(Level.INFO, "Stage 1: The objects were queried and are now being sent back to the consumer!"); }
/** * Decodes the value of this object using the provided MALDecoder. * @param decoder decoder - the decoder to use for decoding. * @return Returns this object. * @throws org.ccsds.moims.mo.mal.MALException if any decoding errors are detected. */ public org.ccsds.moims.mo.mal.structures.Element decode(org.ccsds.moims.mo.mal.MALDecoder decoder) throws org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.MALListDecoder listDecoder = decoder.createListDecoder(this); int decodedSize = listDecoder.size(); if (decodedSize > 0) { ensureCapacity(decodedSize); } while (listDecoder.hasNext()) { add((org.ccsds.moims.mo.com.archive.structures.ArchiveQuery) listDecoder.decodeNullableElement(new org.ccsds.moims.mo.com.archive.structures.ArchiveQuery())); } return this; }