com.psddev.dari.db.Query.isCache()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中com.psddev.dari.db.Query.isCache方法的一些代码示例,展示了Query.isCache的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.isCache方法的具体详情如下:
包路径:com.psddev.dari.db.Query
类名称:Query
方法名:isCache

Query.isCache介绍

[英]Returns true if the result of this query can be cached and it can return a cached result.
[中]

代码示例

代码示例来源:origin: perfectsense/dari

private boolean isCacheDisabled(Query<?> query) {
  if (query.isCache()) {
    return query.as(QueryOptions.class).isDisabled();
  } else {
    return true;
  }
}

代码示例来源:origin: perfectsense/dari

private boolean checkReplicationCache(Query<?> query) {
  return query.isCache()
      && isEnableReplicationCache()
      && binaryLogReader != null
      && binaryLogReader.isConnected();
}

代码示例来源:origin: perfectsense/dari

private boolean checkFunnelCache(Query<?> query) {
  return query.isCache()
      && !query.isReferenceOnly()
      && isEnableFunnelCache()
      && !Boolean.TRUE.equals(query.getOptions().get(Database.DISABLE_FUNNEL_CACHE_QUERY_OPTION))
      && funnelCache != null;
}

代码示例来源:origin: perfectsense/dari

private boolean checkReplicationCache(Query<?> query) {
  return query.isCache()
      && !query.isMaster()
      && isEnableReplicationCache()
      && !Boolean.TRUE.equals(query.getOptions().get(DISABLE_REPLICATION_CACHE_QUERY_OPTION))
      && mysqlBinaryLogReader != null
      && mysqlBinaryLogReader.isConnected();
}

代码示例来源:origin: perfectsense/dari

objectState.setDatabase(query.getDatabase());
objectState.setResolveToReferenceOnly(query.isResolveToReferenceOnly());
objectState.setResolveUsingCache(query.isCache());
objectState.setResolveUsingMaster(query.isMaster());
objectState.setResolveInvisible(query.isResolveInvisible());

相关文章