Package com.hazelcast.query

Examples of com.hazelcast.query.SqlPredicate


        this.sql = sql;
    }

    @Override
    protected Predicate getPredicate() {
        return new SqlPredicate(sql);
    }
View Full Code Here


        super(name, requestType, null, null, null);
        this.predicate = predicate;
    }

    protected Predicate getPredicate() {
        return new SqlPredicate(predicate);
    }
View Full Code Here

        this.predicate = predicate;
    }

    protected Predicate getPredicate() {
        if (cachedPredicate == null && predicate != null) {
            cachedPredicate = new SqlPredicate(predicate);
        }
        return cachedPredicate;
    }
View Full Code Here

    @ManagedAnnotation(value = "values", operation = true)
    public String values(String query){
        Collection coll;
        if (query != null && !query.isEmpty()){
            Predicate predicate = new SqlPredicate(query);
            coll = managedObject.values(predicate);
        }
        else {
            coll = managedObject.values();
        }
View Full Code Here

    @ManagedAnnotation(value = "entrySet", operation = true)
    public String entrySet(String query){
        Set<Map.Entry> entrySet;
        if (query != null && !query.isEmpty()){
            Predicate predicate = new SqlPredicate(query);
            entrySet = managedObject.entrySet(predicate);
        }
        else {
            entrySet = managedObject.entrySet();
        }
View Full Code Here

            }
        }, 4);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.entrySet(new SqlPredicate("year=" + random.nextInt(100))).iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 1);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.entrySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 10);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.keySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 10);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.localKeySet().iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 10);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.localKeySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 10);
View Full Code Here

    /**
     * query map with a sql like syntax (see http://www.hazelcast.com/)
     */
    private void query(String query, Exchange exchange) {
        Collection<Object> result = this.cache.values(new SqlPredicate(query));
        exchange.getOut().setBody(result);
    }
View Full Code Here

    /**
     * query map with a sql like syntax (see http://www.hazelcast.com/)
     */
    private void query(String query, Exchange exchange) {
        Collection<Object> result = this.cache.values(new SqlPredicate(query));
        exchange.getOut().setBody(result);
    }
View Full Code Here

    /**
     * query map with a sql like syntax (see http://www.hazelcast.com/)
     */
    private void query(String query, Exchange exchange) {
        Collection<Object> result = this.cache.values(new SqlPredicate(query));
        exchange.getOut().setBody(result);
    }
View Full Code Here

    /**
     * query map with a sql like syntax (see http://www.hazelcast.com/)
     */
    private void query(String query, Exchange exchange) {
        Collection<Object> result = this.cache.values(new SqlPredicate(query));
        exchange.getOut().setBody(result);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.query.SqlPredicate

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.