Examples of KeyIterator


Examples of com.caucho.quercus.env.JavaCollectionAdapter.KeyIterator

  }
 
  @Override
  public Iterator<Value> getKeyIterator(Env env)
  {
    return new KeyIterator();
  }
View Full Code Here

Examples of com.caucho.quercus.env.JavaCollectionAdapter.KeyIterator

  }
 
  @Override
  public Iterator<Value> getKeyIterator(Env env)
  {
    return new KeyIterator();
  }
View Full Code Here

Examples of com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyIterator

    public KeyIterator getKeys(final KeyRangeQuery query, final StoreTransaction txh) throws StorageException {
        final String p = txh.getConfiguration().getMetricsPrefix();
        return runWithMetrics(p, metricsStoreName, M_GET_KEYS,
            new StorageCallable<KeyIterator>() {
                public KeyIterator call() throws StorageException {
                    KeyIterator ki = backend.getKeys(query, txh);
                    if (null != p) {
                        return MetricInstrumentedIterator.of(ki, p + "." + metricsStoreName + "." + M_GET_KEYS + "." + M_ITERATOR);
                    } else {
                        return ki;
                    }
View Full Code Here

Examples of com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyIterator

    public KeyIterator getKeys(final SliceQuery query, final StoreTransaction txh) throws StorageException {
        final String p = txh.getConfiguration().getMetricsPrefix();
        return runWithMetrics(p, metricsStoreName, M_GET_KEYS,
            new StorageCallable<KeyIterator>() {
                public KeyIterator call() throws StorageException {
                    KeyIterator ki = backend.getKeys(query, txh);
                    if (null != p) {
                        return MetricInstrumentedIterator.of(ki, p + "." + metricsStoreName + "." + M_GET_KEYS + "." + M_ITERATOR);
                    } else {
                        return ki;
                    }
View Full Code Here

Examples of freenet.support.SimpleFieldSet.KeyIterator

    HTMLNode legendRow = legendTable.addChild("tr");
    legendRow.addChild("td", "class", "translation-key", l10n("translationKeyLabel"));
    legendRow.addChild("td", "class", "translation-key", l10n("originalVersionLabel"));
    legendRow.addChild("td", "class", "translation-key", l10n("currentTranslationLabel"));
   
    KeyIterator it = this.base.getDefaultLanguageTranslation().keyIterator("");
   
    while(it.hasNext()) {
      String key = it.nextKey();
      boolean isOverriden = this.base.isOverridden(key);
      if(!showEverything && (isOverriden || (this.base.getString(key, true) != null))) continue;
      HTMLNode contentRow = legendTable.addChild("tr");
      contentRow.addChild("td", "class", "translation-key",
          key
View Full Code Here

Examples of freenet.support.SimpleFieldSet.KeyIterator

    if(request.getPartAsStringFailsafe("translation_update", 32).length() > 0){
      String key = request.getPartAsStringFailsafe("key", 256);
      this.base.setOverride(key, new String(BucketTools.toByteArray(request.getPart("trans")), "UTF-8").trim());
     
      if("on".equalsIgnoreCase(request.getPartAsStringFailsafe("gotoNext", 7))) {
        KeyIterator it = base.getDefaultLanguageTranslation().keyIterator("");
       
        while(it.hasNext()) {
          String newKey = it.nextKey();
          boolean isOverriden = this.base.isOverridden(newKey);
          if(isOverriden || (this.base.getString(newKey, true) != null))
            continue;
          redirectTo(ctx, TOADLET_URL+"?gotoNext&translate="+newKey+ (toTranslateOnly ? "&toTranslateOnly" : ""));
          return;
View Full Code Here

Examples of net.rubyeye.xmemcached.KeyIterator

  public void testKeyIterator() throws Exception {
    if (memcachedClient.getProtocol() == Protocol.Text) {
      Collection<InetSocketAddress> avaliableServers = memcachedClient
          .getAvaliableServers();
      InetSocketAddress address = avaliableServers.iterator().next();
      KeyIterator it = memcachedClient.getKeyIterator(address);
      while (it.hasNext()) {
        memcachedClient.delete(it.next());
      }
      it = memcachedClient.getKeyIterator(address);
      Assert.assertFalse(it.hasNext());
      try {
        it.next();
        Assert.fail();
      } catch (NoSuchElementException e) {
        Assert.assertTrue(true);
      }
      for (int i = 0; i < 10; i++) {
        memcachedClient.set(String.valueOf(i), 0, i);
      }
      it = memcachedClient.getKeyIterator(address);
      Assert.assertTrue(it.hasNext());
      Assert.assertEquals(address, it.getServerAddress());
      while (it.hasNext()) {
        String key = it.next();
        Assert.assertEquals(Integer.parseInt(key), memcachedClient
            .get(key));
      }
      Assert.assertFalse(it.hasNext());
    } else {
      // ignore
    }

  }
View Full Code Here

Examples of net.rubyeye.xmemcached.KeyIterator

      value = memcachedClient.get("a");
      System.out.println("after delete,a=" + value);

      System.out.println("Iterate all keys...");
      // iterate all keys
      KeyIterator it = memcachedClient.getKeyIterator(AddrUtil
          .getOneAddress(args[0]));
      while (it.hasNext()) {
        System.out.println(it.next());
      }

    } catch (MemcachedException e) {
      System.err.println("MemcachedClient operation fail");
      e.printStackTrace();
View Full Code Here

Examples of net.rubyeye.xmemcached.KeyIterator

      value = memcachedClient.get("a");
      System.out.println("after delete,a=" + value);

      System.out.println("Iterate all keys...");
      // iterate all keys
      KeyIterator it = memcachedClient.getKeyIterator(AddrUtil
          .getOneAddress(args[0]));
      while (it.hasNext()) {
        System.out.println(it.next());
      }
      System.out.println(memcachedClient.touch("b", 1000));

    } catch (MemcachedException e) {
      System.err.println("MemcachedClient operation fail");
View Full Code Here

Examples of org.apache.cassandra.io.sstable.KeyIterator

     * @throws IOException on failure to read/write input/output
     */
    public static void enumeratekeys(Descriptor desc, PrintStream outs)
    throws IOException
    {
        KeyIterator iter = new KeyIterator(desc);
        DecoratedKey lastKey = null;
        while (iter.hasNext())
        {
            DecoratedKey key = iter.next();

            // validate order of the keys in the sstable
            if (lastKey != null && lastKey.compareTo(key) > 0 )
                throw new IOException("Key out of order! " + lastKey + " > " + key);
            lastKey = key;

            outs.println(bytesToHex(key.key));
        }
        iter.close();
        outs.flush();
    }
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.