io.ebean.Query.setTimeout()方法的使用及代码示例

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

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

Query.setTimeout介绍

[英]Set a timeout on this query.

This will typically result in a call to setQueryTimeout() on a preparedStatement. If the timeout occurs an exception will be thrown - this will be a SQLException wrapped up in a PersistenceException.
[中]设置此查询的超时时间。
这通常会导致对preparedStatement调用setQueryTimeout()。如果超时发生,将抛出一个异常——这将是一个封装在PersistenceException中的SQLException。

代码示例

代码示例来源:origin: org.actframework/act-ebean2

@Override
public EbeanQuery<MODEL_TYPE> setTimeout(int secs) {
  q.setTimeout(secs);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean

@Override
public EbeanQuery<MODEL_TYPE> setTimeout(int secs) {
  q.setTimeout(secs);
  qReadOnly.setTimeout(secs);
  return this;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Set a timeout on this query.
 * <p>
 * This will typically result in a call to setQueryTimeout() on a
 * preparedStatement. If the timeout occurs an exception will be thrown - this
 * will be a SQLException wrapped up in a PersistenceException.
 * </p>
 *
 * @param secs the query timeout limit in seconds. Zero means there is no limit.
 */
public R setTimeout(int secs) {
 query.setTimeout(secs);
 return root;
}

代码示例来源:origin: icode/ameba

/**
 * {@inheritDoc}
 * Sets a timeout on this query.
 */
public Query<T> setTimeout(int secs) {
  return query().setTimeout(secs);
}

相关文章

Query类方法