Package org.iq80.leveldb

Examples of org.iq80.leveldb.ReadOptions


   }

   @Override
   public void clear() {
      long count = 0;
      DBIterator it = db.iterator(new ReadOptions().fillCache(false));
      boolean destroyDatabase = false;

      if (configuration.clearThreshold() <= 0) {
         try {
            for (it.seekToFirst(); it.hasNext();) {
View Full Code Here


      int batchSize = 100;
      ExecutorAllCompletionService eacs = new ExecutorAllCompletionService(executor);
      final TaskContext taskContext = new TaskContextImpl();

      List<Map.Entry<byte[], byte[]>> entries = new ArrayList<Map.Entry<byte[], byte[]>>(batchSize);
      DBIterator it = db.iterator(new ReadOptions().fillCache(false));
      try {
         for (it.seekToFirst(); it.hasNext();) {
            Map.Entry<byte[], byte[]> entry = it.next();
            entries.add(entry);
            if (entries.size() == batchSize) {
View Full Code Here

            }
         }

         List<Long> times = new ArrayList<Long>();
         List<Object> keys = new ArrayList<Object>();
         DBIterator it = expiredDb.iterator(new ReadOptions().fillCache(false));
         long now = ctx.getTimeService().wallClockTime();
         try {
            for (it.seekToFirst(); it.hasNext();) {
               Map.Entry<byte[], byte[]> entry = it.next();
View Full Code Here

  }

  @Override
  protected void clearLockSafe() throws CacheLoaderException {
    long count = 0;
    DBIterator it = db.iterator(new ReadOptions().fillCache(false));
    boolean destroyDatabase = false;

    if (config.getClearThreshold() <= 0) {
      try {
        for (it.seekToFirst(); it.hasNext();) {
View Full Code Here

  @Override
  protected Set<InternalCacheEntry> loadAllLockSafe()
      throws CacheLoaderException {
    Set<InternalCacheEntry> entries = new HashSet<InternalCacheEntry>();

    DBIterator it = db.iterator(new ReadOptions().fillCache(false));
    try {
      for (it.seekToFirst(); it.hasNext();) {
        Map.Entry<byte[], byte[]> entry = it.next();
        entries.add(unmarshall(entry));
      }
View Full Code Here

    if (maxEntries <= 0)
      return Collections.emptySet();

    Set<InternalCacheEntry> entries = new HashSet<InternalCacheEntry>();

    DBIterator it = db.iterator(new ReadOptions().fillCache(false));
    try {
      it.seekToFirst();
      for (int i = 0; it.hasNext() && i < maxEntries; i++) {
        Map.Entry<byte[], byte[]> entry = it.next();
        entries.add(unmarshall(entry));
View Full Code Here

  @Override
  protected Set<Object> loadAllKeysLockSafe(Set<Object> keysToExclude)
      throws CacheLoaderException {
    Set<Object> keys = new HashSet<Object>();

    DBIterator it = db.iterator(new ReadOptions().fillCache(false));
    try {
      for (it.seekToFirst(); it.hasNext();) {
        Map.Entry<byte[], byte[]> entry = it.next();
        Object key = unmarshall(entry.getKey());
        if (keysToExclude == null || keysToExclude.isEmpty()
View Full Code Here

  }

  @Override
  protected void toStreamLockSafe(ObjectOutput oos)
      throws CacheLoaderException {
    DBIterator it = db.iterator(new ReadOptions().fillCache(false));
    try {

      for (it.seekToFirst(); it.hasNext();) {
        Map.Entry<byte[], byte[]> entry = it.next();
        InternalCacheEntry ice = unmarshall(entry);
View Full Code Here

        }
      }

      List<Long> times = new ArrayList<Long>();
      List<Object> keys = new ArrayList<Object>();
      DBIterator it = expiredDb.iterator(new ReadOptions()
          .fillCache(false));
      try {
        for (it.seekToFirst(); it.hasNext();) {
          Map.Entry<byte[], byte[]> entry = it.next();
View Full Code Here

  }

  @Override
  protected void clearLockSafe() throws CacheLoaderException {
    long count = 0;
    DBIterator it = db.iterator(new ReadOptions().fillCache(false));
    boolean destroyDatabase = false;

    if (config.getClearThreshold() <= 0) {
      try {
        for (it.seekToFirst(); it.hasNext();) {
View Full Code Here

TOP

Related Classes of org.iq80.leveldb.ReadOptions

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.