Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.CollectionImpl.discard()


        r2.setDescription("this is test desc this is test desc this is test desc this is test desc this is test desc " +
                "this is test desc this is test desc this is test desc this is test descthis is test desc ");
        r2.setMediaType("plain/text");
        registry.put(path, r2);

        r2.discard();

        Resource r3 = registry.newResource();

//        assertEquals("Author names are not Equal", "admin", r3.getAuthorUserName());
View Full Code Here


        String path = "/testk2/testa/testc";
        r2.setDescription("this is test desc");
        r2.setProperty("test2", "value2");
        registry.put(path, r2);

        r2.discard();

        Resource r3 = registry.get(path);

//        assertEquals("Author names are not Equal", "admin", r3.getAuthorUserName());
//        assertEquals("Author User names are not Equal", "admin", r3.getAuthorUserName());
View Full Code Here

            }

            assertFalse("Resoruce not found at the path", value);

            res1.discard();
            resource1.discard();
            Thread.sleep(100);
        }
    }

    public void testContinuousUpdate() throws Exception {
View Full Code Here

                    new String((byte[]) resource2.getContent()));

            resource.discard();
            res1.discard();
            resource1.discard();
            resource2.discard();
            Thread.sleep(100);
        }
    }
}
View Full Code Here

        recordResource.setProperty("faultCount", String.valueOf(record.getFaultCount()));
        recordResource.setProperty("maxTime", String.valueOf(record.getMaxTime()));
        recordResource.setProperty("minTime", String.valueOf(record.getMinTime()));
        recordResource.setProperty("avgTime", String.valueOf(record.getAvgTime()));
        registry.put(path, recordResource);
        recordResource.discard();
    }

    private String calculatePath(StatisticsRecord entityRecord) {
        String type = "";
        switch (entityRecord.getType()) {
View Full Code Here

        r2.setDescription("this is test desc this is test desc this is test desc this is test desc this is test desc " +
                "this is test desc this is test desc this is test desc this is test descthis is test desc ");
        r2.setMediaType("plain/text");
        registry.put(path, r2);

        r2.discard();

        Resource r3 = registry.newResource();

//        assertEquals("Author names are not Equal", "admin", r3.getAuthorUserName());
View Full Code Here

        String path = "/testk2/testa/testc";
        r2.setDescription("this is test desc");
        r2.setProperty("test2", "value2");
        registry.put(path, r2);

        r2.discard();

        Resource r3 = registry.get(path);

//        assertEquals("Author names are not Equal", "admin", r3.getAuthorUserName());
//        assertEquals("Author User names are not Equal", "admin", r3.getAuthorUserName());
View Full Code Here

                //*****************************//
                long putEnd = System.nanoTime();
                long putTime = putEnd - putStart;
                System.out.println("CSV," + threadName + "," + "put," + putTime / 1000000);
                //System.out.println("~~~~~end put~~~~~");
                r1.discard();


                long getStart = System.nanoTime();
                //*****************************//
                Resource r2 = registry.get(basePath + i);
View Full Code Here

                Resource r2 = registry.get(basePath + i);
                //*****************************//
                long getEnd = System.nanoTime();
                long getTime = getEnd - getStart;
                System.out.println("CSV," + threadName + "," + "get," + getTime / 1000000);
                r2.discard();

                //System.out.println("~~~~~begin delete~~~~~");
                long deleteStart = System.nanoTime();
                //*****************************//
                registry.delete(basePath + i);
View Full Code Here

                r.setProperty("p2", "v2");
                //long startPut = System.nanoTime();
                registry.put(rPath, r);
                //long endPut = System.nanoTime();
                //System.out.println("CSV,"+threadName+",put,"+(endPut-startPut));
                r.discard();
                Thread.yield();

                // read and update the resource

                registry.resourceExists(rPath);
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.