Examples of RecordMetaData


Examples of com.dbxml.db.core.data.RecordMetaData

      try {
         CollectionClientImpl col = (CollectionClientImpl)client.getCollection(colName);
         if ( col == null )
            throw new CompilationException("Template Collection '" + colName + "' not found");

         RecordMetaData meta = col.getInternalCollection().getRecordMetaData(tx, new Key(docName));
         long lastModified = System.currentTimeMillis();
         if ( meta != null ) {
            Long lm = (Long)meta.getValue(RecordMetaData.MODIFIED);
            if ( lm != null )
               lastModified = lm.longValue();
         }

         TemplatesInfo info = (TemplatesInfo)cache.get(path);
View Full Code Here

Examples of com.dbxml.db.core.data.RecordMetaData

         if ( restHandler && httpEndpoint ) {
            Request request = context.getRequest();
            Response response = context.getResponse();

            RecordMetaData meta = col.getRecordMetaData(tx, key);
            if ( meta != null ) {
               Long lm = (Long)meta.getValue(RecordMetaData.MODIFIED);
               if ( lm != null ) {
                  String lastModified = GDF.format(new Date(lm.longValue()));

                  response.setHeader(HTTP.HEADER_CACHE_CONTROL, HTTP.VALUE_CACHE);
                  response.setHeader(HTTP.HEADER_LAST_MODIFIED, lastModified);
View Full Code Here

Examples of com.dbxml.db.core.data.RecordMetaData

   private RecordMetaData buildMetaData(Page p) {
      BTreeFilerPageHeader ph = (BTreeFilerPageHeader)p.getPageHeader();
      HashMap meta = new HashMap(2);
      meta.put(RecordMetaData.CREATED, new Long(ph.getCreated()));
      meta.put(RecordMetaData.MODIFIED, new Long(ph.getModified()));
      return new RecordMetaData(meta);
   }
View Full Code Here

Examples of com.dbxml.db.core.data.RecordMetaData

      checkOpened();
      try {
         long pos = findValue(tx, key);
         Page page = getPage(tx, pos);
         Value v = readValue(tx, page);
         RecordMetaData md = buildMetaData(page);
         return new Record(key, v, md);
      }
      catch ( BTreeNotFoundException b ) {
      }
      catch ( BTreeException b ) {
View Full Code Here

Examples of com.dbxml.db.core.data.RecordMetaData

   private RecordMetaData buildMetaData(File f) {
      HashMap meta = new HashMap(2);
      meta.put(RecordMetaData.MODIFIED, new Long(f.lastModified()));
      meta.put(RecordMetaData.SIZE, new Long(f.length()));
      return new RecordMetaData(meta);
   }
View Full Code Here

Examples of com.dbxml.db.core.data.RecordMetaData

         locks.acquireLock(file);

         if ( file.exists() && file.isFile() ) {
            byte[] valueData = new byte[(int)file.length()];
            FileInputStream fis = new FileInputStream(file);
            RecordMetaData md = buildMetaData(file);

            fis.read(valueData);
            fis.close();

            return new Record(key, new Value(valueData), md);
View Full Code Here

Examples of org.apache.kafka.clients.producer.RecordMetadata

    private RecordMetadata valueOrError() throws ExecutionException {
        if (this.result.error() != null)
            throw new ExecutionException(this.result.error());
        else
            return new RecordMetadata(result.topicPartition(), this.result.baseOffset(), this.relativeOffset);
    }
View Full Code Here

Examples of org.apache.kafka.clients.producer.RecordMetadata

                        // we assume that cancelled requests should not be retried.
                        retry = false;
                    }
                    try {
                        // wait for request to finish
                        RecordMetadata response = responseFtr.get();
                        if( response.topic() == null ){
                            log.warn( "Kafka producer got null topic in response" );
                        }
                        sentCount.incrementAndGet();
                        sentByteCount.addAndGet( m.getPayload().length );
                        failure = false;
View Full Code Here

Examples of org.fusesource.camel.component.sap.model.rfc.RecordMetaData

public class ConnectionInfoMetadataProducer {
    @Produces
    @Named("connectionInfo")
    public RecordMetaData createConnectionInfo(
            @Named("connectionInfoFieldMetaData") List<FieldMetaData> connectionInfoFieldMetaData ) {
        RecordMetaData conninfo = RfcFactory.eINSTANCE.createRecordMetaData();
        conninfo.setName("CONNECTION_INFO");
        conninfo.setRecordFieldMetaData(connectionInfoFieldMetaData);
        return conninfo;
    }
View Full Code Here

Examples of org.fusesource.camel.component.sap.model.rfc.RecordMetaData

    @Produces
    @Named("flightInfo")
    public RecordMetaData createFlightInfo(
            @Named("flightInfoFieldMetaData") List<FieldMetaData> flightInfoFieldMetaData ) {
        RecordMetaData flightinfo = RfcFactory.eINSTANCE.createRecordMetaData();
        flightinfo.setName("FLTINFO_STRUCTURE");
        flightinfo.setRecordFieldMetaData(flightInfoFieldMetaData);
        return flightinfo;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.