Examples of UsageListing


Examples of com.netflix.exhibitor.core.analyze.UsageListing

    @Produces("text/plain")
    public Response     usageListing(UsageListingRequest usageListingRequest) throws Exception
    {
        context.getExhibitor().getLog().add(ActivityLog.Type.INFO, "Starting usage listing");

        final UsageListing        usageListing = new UsageListing(context.getExhibitor(), usageListingRequest.getStartPath(), usageListingRequest.getMaxChildrenForTraversal());
        usageListing.generate();

        final PipedInputStream      in = new PipedInputStream();
        final PipedOutputStream     pipedOutputStream = new PipedOutputStream(in);
        executorService.submit
        (
            new Runnable()
            {
                @Override
                public void run()
                {
                    PrintStream     out = null;
                    try
                    {
                        out = new PrintStream(pipedOutputStream);
                        out.println("Path\tCreateDate\tChildQty\tDeepChildQty");

                        Iterator<String> iterator = usageListing.getPaths();
                        while ( iterator.hasNext() )
                        {
                            String                  path = iterator.next();
                            UsageListing.NodeEntry  details = usageListing.getNodeDetails(path);
                            out.println(path + "\t" + details.getCreationDate() + "\t" + details.getDirectChildQty() + "\t" + details.getDeepChildQty());
                        }
                    }
                    catch ( Exception e )
                    {
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.