public class ResultStorageBase<V> extends Object implements ResultStorage<V>, ResultStorageStreaming<V>
| Modifier and Type | Field and Description |
|---|---|
protected V[] |
arrayResultType |
protected List<V> |
errorResult |
protected ResultRecordFilter<V> |
filter |
protected Set<V> |
resultSet |
protected static ThreadLocal<Map<String,Comparator<?>>> |
safeComparator |
protected static ThreadLocal<Map<String,ResultRecordFilter<?>>> |
safeFilter |
protected static ThreadLocal<Map<String,ResultRecordSort<?>>> |
safeSoter |
protected AbstractServerModuleBase |
serverBase |
| Constructor and Description |
|---|
ResultStorageBase(AbstractServerModuleBase serverBase,
V[] arrayResultType)
コンストラクタ
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkFilter(V result)
結果レコードをフィルタチェックする
|
boolean |
contains(V result)
結果と同じレコードを処理済みかチェックする
|
List<V> |
getError()
ストリーミングでの結果通知に失敗した検索結果を取得する
|
List<V> |
getResult()
ストレージから検索結果を取り出す
|
protected Comparator<V> |
loadComparator()
コンパレータをロードする.
|
protected ResultRecordFilter<V> |
loadFilter()
フィルターをロードする.
|
protected ResultRecordSort<V> |
loadSorter()
ソーターをロードする.
|
void |
pushError(V result)
ストリーミングでの結果通知に失敗したデータをストレージに格納する
|
boolean |
pushResult(V result)
検索結果をストレージに格納する
|
protected final AbstractServerModuleBase serverBase
protected static final ThreadLocal<Map<String,Comparator<?>>> safeComparator
protected static final ThreadLocal<Map<String,ResultRecordSort<?>>> safeSoter
protected static final ThreadLocal<Map<String,ResultRecordFilter<?>>> safeFilter
protected final V[] arrayResultType
protected final ResultRecordFilter<V> filter
public ResultStorageBase(AbstractServerModuleBase serverBase, V[] arrayResultType)
serverBase - サーバーベースオブジェクトarrayResultType - 検索結果の結果型public boolean pushResult(V result)
ResultStoragepushResult in interface ResultStorage<V>result - 検索結果public List<V> getResult()
ResultStoragegetResult in interface ResultStorage<V>protected Comparator<V> loadComparator()
protected ResultRecordSort<V> loadSorter()
protected ResultRecordFilter<V> loadFilter()
public boolean contains(V result)
ResultStorageStreamingcontains in interface ResultStorageStreaming<V>result - 結果レコードpublic boolean checkFilter(V result)
ResultStorageStreamingcheckFilter in interface ResultStorageStreaming<V>result - 結果レコードpublic void pushError(V result)
ResultStoragepushError in interface ResultStorage<V>result - 検索結果public List<V> getError()
ResultStoragegetError in interface ResultStorage<V>Copyright (C) 2014 Information Analysis Laboratory, NICT
RaSC is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.
RaSC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see (http://www.gnu.org/licenses/) .