Package com.persistit

Examples of com.persistit.KeyFilter$OrTerm


  public Iterable<V> values(Object firstKey, Object secondKey) {
    try {
      exchange.clear();
      exchange.append(firstKey).append(secondKey).append(Key.BEFORE);
      Exchange iteratorExchange = new Exchange(exchange);
      KeyFilter filter = new KeyFilter().append(KeyFilter.simpleTerm(firstKey)).append(KeyFilter.simpleTerm(secondKey));
      return new ValueIterable<V>(iteratorExchange, filter);
    } catch (Exception e) {
      throw failToGetValues(e);
    }
  }
View Full Code Here


  public Iterable<V> values(Object firstKey) {
    try {
      exchange.clear();
      exchange.append(firstKey).append(Key.BEFORE);
      Exchange iteratorExchange = new Exchange(exchange);
      KeyFilter filter = new KeyFilter().append(KeyFilter.simpleTerm(firstKey));
      return new ValueIterable<V>(iteratorExchange, filter);
    } catch (Exception e) {
      throw failToGetValues(e);
    }
  }
View Full Code Here

   */
  public Iterable<V> values() {
    try {
      exchange.clear().append(Key.BEFORE);
      Exchange iteratorExchange = new Exchange(exchange);
      KeyFilter filter = new KeyFilter().append(KeyFilter.ALL);
      return new ValueIterable<V>(iteratorExchange, filter);
    } catch (Exception e) {
      throw failToGetValues(e);
    }
  }
View Full Code Here

    }
  }

  public Iterable<Entry<V>> entries() {
    exchange.clear().to(Key.BEFORE);
    KeyFilter filter = new KeyFilter().append(KeyFilter.ALL);
    return new EntryIterable<V>(new Exchange(exchange), filter);
  }
View Full Code Here

    return new EntryIterable<V>(new Exchange(exchange), filter);
  }

  public Iterable<Entry<V>> entries(Object firstKey) {
    exchange.clear().append(firstKey).append(Key.BEFORE);
    KeyFilter filter = new KeyFilter().append(KeyFilter.simpleTerm(firstKey));
    return new EntryIterable<V>(new Exchange(exchange), filter);
  }
View Full Code Here

    private static boolean entryExistsSkipSelf(Index index, Exchange exchange) throws PersistitException {
       
        boolean status = false;
        if (exchange.getKey().getDepth() < index.getAllColumns().size() &&
                exchange.hasChildren()) {
            KeyFilter kf = new KeyFilter(exchange.getKey());
            status = exchange.next(kf);
            status = status && exchange.next(kf);
        } else {
            status = exchange.traverse(Key.Direction.EQ, false, -1);
        }
View Full Code Here

                            // Don't reload memory table definitions
                            ex.clear().append(S_K_PROTOBUF_MEM).remove();
                        }
                        // Clear old trees
                        ex.clear();
                        KeyFilter filter = new KeyFilter().append(KeyFilter.simpleTerm(S_K_DELAYED));
                        while(ex.traverse(Key.Direction.GT, filter, Integer.MAX_VALUE)) {
                            ex.getKey().indexTo(1);     // skip delayed key
                            ex.getKey().decodeLong();   // skip id
                            long timestamp = ex.getKey().decodeLong();
                            ex.getValue().setStreamMode(true);
View Full Code Here

TOP

Related Classes of com.persistit.KeyFilter$OrTerm

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.