Package org.teiid.cache

Examples of org.teiid.cache.Cachable.restore()


   
    CacheID id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
   
    Cachable result = Mockito.mock(Cachable.class);
    Mockito.stub(result.prepare((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
    Mockito.stub(result.restore((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
       
    cache.put(id, Determinism.USER_DETERMINISTIC, result, null);
   
    // make sure that in the case of session specific; we do not call prepare
    // as session is local only call for distributed
View Full Code Here


   
    CacheID id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
   
    Cachable result = Mockito.mock(Cachable.class);
    Mockito.stub(result.prepare((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
    Mockito.stub(result.restore((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);   
   
    cache.put(id, Determinism.VDB_DETERMINISTIC, result, null);
   
    // make sure that in the case of session specific; we do not call prepare
    // as session is local only call for distributed
View Full Code Here

   
    CacheID id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
   
    Cachable result = Mockito.mock(Cachable.class);
    Mockito.stub(result.prepare((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
    Mockito.stub(result.restore((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);   
   
    id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
    cache.put(id, Determinism.VDB_DETERMINISTIC, result, null);
   
    Object c = cache.get(id);
View Full Code Here

        result = distributedCache.get(id);
      }
     
      if (result instanceof Cachable) {
        Cachable c = (Cachable)result;
        if (!c.restore(this.tupleBatchCache, this.bufferManager)) {
          result = null;
        }
      }
    }
   
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.