This commit is contained in:
Redkale
2018-04-10 14:15:50 +08:00
parent 67afd13fbb
commit dab56caa98
2 changed files with 39 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ import org.redkale.service.*;
import org.redkale.util.*;
/**
* DataSource的异步抽象实现类
* DataSource的SQL抽象实现类
*
* <p>
* 详情见: https://redkale.org
@@ -21,6 +21,6 @@ import org.redkale.util.*;
@AutoLoad(false)
@SuppressWarnings("unchecked")
@ResourceType(DataSource.class)
public abstract class DataAsyncSource extends AbstractService implements DataSource, DataCacheListener, Function<Class, EntityInfo>, AutoCloseable, Resourcable {
public abstract class DataSqlSource extends AbstractService implements DataSource, DataCacheListener, Function<Class, EntityInfo>, AutoCloseable, Resourcable {
}

View File

@@ -0,0 +1,36 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.redkale.source;
import java.util.Properties;
import java.util.concurrent.CompletableFuture;
/**
* 连接池类
*
* <p>
* 详情见: https://redkale.org
*
* @author zhangjx
* @param <T> 连接泛型
*/
public abstract class PoolSource<T> {
/**
* 是否异步, 为true则只能调用pollAsync方法为false则只能调用poll方法
*
* @return 是否异步
*/
public abstract boolean isAysnc();
public abstract void change(Properties property);
public abstract T poll();
public abstract CompletableFuture<T> pollAsync();
public abstract void close();
}