Examples of lastModified()


Examples of org.apache.twill.filesystem.Location.lastModified()

          location = copyFromURL(url, createTempLocation(Paths.appendSuffix(url.getFile(), localFile.getName())));
          LOG.debug("Done {} : {}", runnableName, url);
        }

        localFiles.put(runnableName,
                       new DefaultLocalFile(localFile.getName(), location.toURI(), location.lastModified(),
                                            location.length(), localFile.isArchive(), localFile.getPattern()));
      }
    }
    LOG.debug("Done Runnable LocalFiles");
  }
View Full Code Here

Examples of org.codehaus.janino.util.resource.Resource.lastModified()

                );
                classFileResource = classFile.exists() ? new FileResource(classFile) : null;
            }

            // Compare source modification time against class file modification time.
            if (classFileResource != null && sourceResource.lastModified() <= classFileResource.lastModified()) {

                // The class file is up-to-date; load it.
                return this.defineIClassFromClassFileResource(classFileResource);
            } else {
View Full Code Here

Examples of org.eclipse.jetty.util.resource.Resource.lastModified()

                    content=httpContent.getInputStream();
            }
            else if (content instanceof Resource)
            {
                resource=(Resource)content;
                _responseFields.putDateField(HttpHeaders.LAST_MODIFIED_BUFFER, resource.lastModified());
                content=resource.getInputStream();
            }

            // Process content.
            if (content instanceof Buffer)
View Full Code Here

Examples of org.eclipse.jgit.util.FS.lastModified()

    FS fs = FS.DETECTED;
    if (lastFile != null && !fs.exists(lastFile))
      throw new FileNotFoundException(lastFile.getPath());
    File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
    try {
      long startTime = (lastFile == null) ? fs.lastModified(tmp) : fs
          .lastModified(lastFile);
      long actTime = fs.lastModified(tmp);
      while (actTime <= startTime) {
        Thread.sleep(sleepTime);
        sleepTime *= 5;
View Full Code Here

Examples of org.elasticsearch.index.store.StoreFileMetaData.lastModified()

        StoreFileMetaData md = filesMetadata.get(name);
        if (md == null) {
            return null;
        }
        // IndexOutput not closed, does not exists
        if (md.lastModified() == -1 || md.length() == -1) {
            return null;
        }
        return md;
    }
View Full Code Here

Examples of org.geoserver.platform.resource.Resource.lastmodified()

        public ResourcesBuilder resource(String path, InputStream content) {
            Resource r = mock(Resource.class);
            when(r.path()).thenReturn(path);
            when(r.name()).thenReturn(path.substring(path.lastIndexOf('/')+1));
            when(r.getType()).thenReturn(Type.RESOURCE);
            when(r.lastmodified()).thenReturn( System.currentTimeMillis() );
            when(r.in()).thenReturn(content);
            when(r.out()).thenReturn(new ByteArrayOutputStream());
           
            when(resourceStore.get(path)).thenReturn(r);
            paths.add( path );
View Full Code Here

Examples of org.impalaframework.file.FileMonitor.lastModified()

        final ConfigurableApplicationContext p13reloaded = getModule(plugin1);
        assertNotSame(p13reloaded, p13);
        FileMonitor f1reloaded = (FileMonitor) context3.getBean("bean1");

        assertEquals(f1.lastModified((File) null), f1reloaded.lastModified((File) null));
        service(f1reloaded);
        assertSame(f1reloaded, f1);

        // now reload plugin2, which will also reload plugin3
        assertTrue(Impala.reloadModule(plugin2));
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.SwiftObject.lastModified()

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         SwiftObject object = api.objectApiInRegionForContainer("DFW", "myContainer").head("myObject");
         assertEquals(object.name(), "myObject");
         assertEquals(object.etag(), "8a964ee2a5e88be344f36c22562a6486");
         assertEquals(object.lastModified(), dates.rfc822DateParse("Fri, 12 Jun 2010 13:40:18 GMT"));
         for (Entry<String, String> entry : object.metadata().entrySet()) {
            assertEquals(object.metadata().get(entry.getKey().toLowerCase()), entry.getValue());
         }
         assertEquals(object.payload().getContentMetadata().getContentLength(), new Long(4));
         assertEquals(object.payload().getContentMetadata().getContentType(), "text/plain; charset=UTF-8");
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.SwiftObject.Builder.lastModified()

      }
      BlobMetadata from = BlobMetadata.class.cast(in);
      Builder to = SwiftObject.builder();
      to.name(from.getName());
      to.etag(from.getETag());
      to.lastModified(from.getLastModified());
      long bytes = from.getContentMetadata().getContentLength();
      String contentType = from.getContentMetadata().getContentType();
      to.payload(payload(bytes, contentType));
      to.metadata(from.getUserMetadata());
      return to.build();
View Full Code Here

Examples of org.jruby.util.JRubyFile.lastModified()

       
        if (!file.exists()) {
            throw runtime.newErrnoENOENTError("No such file or directory - " + path);
        }
       
        return runtime.newTime(file.lastModified());
    }
}
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.