Package org.elasticsearch.common.joda.time

Examples of org.elasticsearch.common.joda.time.Instant


                builder.field("ok", true);
                builder.startObject("state");
                response.getState().toXContent(builder, ToXContent.EMPTY_PARAMS);
                builder.startArray("files");
                for (File file : response.getFiles()) {
                    Instant instant = new Instant(file.lastModified());
                    builder.startObject()
                            .field("path", file.getAbsolutePath())
                            .field("lastmodified", instant.toDateTime().toString())
                            .field("size", new SizeValue(file.length(), SizeUnit.SINGLE).toString())
                            .field("totalspace", new SizeValue(file.getTotalSpace(), SizeUnit.SINGLE).toString())
                            .field("usablespace", new SizeValue(file.getUsableSpace(), SizeUnit.SINGLE).toString())
                            .field("freespace", new SizeValue(file.getFreeSpace(), SizeUnit.SINGLE).toString())
                            .endObject();
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.joda.time.Instant

Copyright © 2018 www.massapicom. 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.