public class TankerImplSecure extends TankerImpl
elementsSecure() - should be synchronized by user as it
returns a wrapped iterator.
openSecure() - should be synchronized by user. It is
necessary to use its pair method close() in the finally block.
Example follows:
synchronized (tanker) {
try {
tanker.openSecure();
...
} finally {
tanker.close();
}
}
| Constructor and Description |
|---|
TankerImplSecure() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(BarrelReader barrelReader)
Appends a reader to this tanker.
|
void |
close()
Closes this tanker.
|
void |
commit()
Commits all the changes.
|
HashMap<Long,Boolean> |
commitWithResults()
Performes a commit and returns information about the whole process.
|
long |
deleted()
Total number of deleted documents in this group.
|
void |
destroy()
Description of the Method
|
Sequence<Barrel> |
elements()
Deprecated.
|
Sequence<Barrel> |
elementsSecure()
Gets elements of this tanker, done in multithreaded safe way.
|
Sequence<? extends IListMetadata> |
expand(String expr)
Return the enumeration of all IListMetadata objects which match the
expression.
|
DocumentData |
expandDocMetadata(DocumentData ofBarrel,
Token[] interest)
Deprecated.
|
DocumentData |
expandDocMetadataSecure(DocumentData ofBarrel,
Token[] interest)
Standard exapnding of doc metadata, but using multithreaded safe way.
|
void |
forEach(Task<Barrel> task)
Put the given task to all active (inner) barrels.
|
Bitmap |
getBitmap(String label)
Return the Bitmap of a given label.
|
CWI |
getCWI(HashSet<Token> terms)
Return the subset of CWI for the given subset of terms.
|
IListMetadata |
getIListMeta(String term)
Return the inverted list metadata for the given term.
|
DocumentData |
getMeta(long uid)
Return the metadata for the document with the given unique
identifier.
|
int |
getRootVersionID() |
void |
initializeTankerSecure(String indexDir,
DataRepository repo,
boolean useBerkeleyGP,
boolean MTE,
int capacity,
int mergeFactor,
String lockServerConfigFilename,
int indexConstPeriodOfTime)
Initializations of the tanker.
|
void |
initializeTankerSecure(String indexDir,
DataRepository repo,
boolean useBerkeleyGP,
boolean MTE,
int capacity,
String lockServerConfigFilename,
int indexConstPeriodOfTime)
Initializations of the tanker.
|
boolean |
isDirty()
Test whether this Tanker has been modified.
|
void |
iterate(Request<Barrel> task)
Iterate through the active (inner) barrels in predefined and
constant order and try to give them the request until one of
them fulfills it.
|
Properties |
loadState()
Read properties of the Tanker
|
BarrelReader |
open()
Deprecated.
|
IListReader |
openIList(String term,
boolean clean)
Deprecated.
|
IListReader |
openIListSecure(String term,
boolean clean)
Opens IList reader using secure multithreading safe way.
|
BarrelReader |
openSecure()
Opens a reader for this tanker, using secure multithreading safe way.
|
void |
optimize()
Optimize this tanker.
|
QueryResponse |
query(int offset,
int length,
int p,
String query,
long max_hits2scan,
double pg_rerank,
String... controls)
Deprecated.
|
void |
query(Query q,
ResultList result)
Deprecated.
|
QueryResponse |
querySecure(int offset,
int length,
int p,
String query,
long max_hits2scan,
double pg_rerank,
String... controls)
Standard query, but using multithreaded safe way.
|
void |
querySecure(Query q,
ResultList result)
Standard query, but using multithreaded safe way.
|
void |
reloadIndex(int indexConstPeriodOfTime)
Relaods the whole index.
|
boolean |
removeDoc(long id)
Deprecated.
|
void |
removeDoc(long id,
int revision) |
void |
setBitmap(String label,
Bitmap bitmap)
Try to set the Bitmap of a given label.
|
long |
size()
Return the number of all documents in this Barrel (including the
deleted ones).
|
initializeTanker, initializeTankergetCache, initializeCache, initializeCache, initializeCache, initializeCache, query, resolvepublic void initializeTankerSecure(String indexDir, DataRepository repo, boolean useBerkeleyGP, boolean MTE, int capacity, String lockServerConfigFilename, int indexConstPeriodOfTime) throws IOException
null, then file locking is used. It must be in
java.util.Properties format.indexDir - repo - useBerkeleyGP - MTE - capacity - lockServerConfigFilename - indexConstPeriodOfTime - IOExceptionpublic void initializeTankerSecure(String indexDir, DataRepository repo, boolean useBerkeleyGP, boolean MTE, int capacity, int mergeFactor, String lockServerConfigFilename, int indexConstPeriodOfTime) throws IOException
null, then file locking is used. It must be in
java.util.Properties format.indexDir - repo - useBerkeleyGP - MTE - capacity - mergeFactor - lockServerConfigFilename - indexConstPeriodOfTime - IOException@Deprecated public BarrelReader open()
Grouppublic BarrelReader openSecure() throws EgothorIndexConstExpiredException
In case of muliple thread sharing one instance of the tanker this method
should be synchronized by user as follows. It is necessary to use its
pair method close() in the finally block! :
synchronized (tanker) {
try {
tanker.openSecure();
...
} finally {
tanker.close();
}
}
EgothorIndexConstExpiredException - If index constancy expired AND index has changed.@Deprecated public IListReader openIList(String term, boolean clean)
Grouppublic IListReader openIListSecure(String term, boolean clean) throws EgothorIndexConstExpiredException
term - clean - EgothorIndexConstExpiredException - If index constancy expired AND index has changed.@Deprecated public QueryResponse query(int offset, int length, int p, String query, long max_hits2scan, double pg_rerank, String... controls) throws ParseException
GroupControlsHandlerGlad
handler.query in class Groupoffset - where to start reading the result listlength - read the result list up to herep - power parameter in evaluation formula @{link org.egothor.Constants#DEFAULTMODEL}query - the user's querymax_hits2scan - maximum positive hits scanned, if achieved then total number of hits is only guessedpg_rerank - pagerank booster @{link org.egothor.core.query.ResultList}controls - control tokens (String)ParseException - if there is difficulty parsing the querypublic QueryResponse querySecure(int offset, int length, int p, String query, long max_hits2scan, double pg_rerank, String... controls) throws ParseException, EgothorIndexConstExpiredException
offset - length - p - query - max_hits2scan - pg_rerank - controls - ParseExceptionEgothorIndexConstExpiredException - If index constancy expired AND index has changed.@Deprecated public void query(Query q, ResultList result)
Grouppublic void querySecure(Query q, ResultList result) throws EgothorIndexConstExpiredException
q - result - EgothorIndexConstExpiredException - If index constancy expired AND index has changed.@Deprecated public DocumentData expandDocMetadata(DocumentData ofBarrel, Token[] interest)
GroupexpandDocMetadata in class TankerImplpublic DocumentData expandDocMetadataSecure(DocumentData ofBarrel, Token[] interest) throws EgothorIndexConstExpiredException
ofBarrel - interest - EgothorIndexConstExpiredException - If index constancy expired AND index has changed.public void append(BarrelReader barrelReader)
append in interface BarrelWriterappend in class TankerImplbarrelReader - the Barrel to add@Deprecated public boolean removeDoc(long id)
GroupremoveDoc in interface BarrelremoveDoc in class TankerImplid - the document to removepublic void removeDoc(long id,
int revision)
id - uid of the documentrevision - revision of the documentpublic HashMap<Long,Boolean> commitWithResults()
public void commit()
commit in interface Barrelcommit in class TankerImplpublic void reloadIndex(int indexConstPeriodOfTime)
throws IOException
indexConstPeriodOfTime - IOExceptionpublic void destroy()
TankerImpldestroy in interface Barreldestroy in class TankerImplpublic void close()
In case of muliple thread sharing one instance of the tanker this method
should be used everytime an openSecure() method is called and
synchronized by user as follows:
synchronized (tanker) {
try {
tanker.openSecure();
...
} finally {
tanker.close();
}
}
close in interface AutoCloseableclose in interface Barrelclose in interface BarrelWriterclose in class TankerImplpublic void optimize()
@Deprecated public Sequence<Barrel> elements()
Tankerpublic Sequence<Barrel> elementsSecure() throws EgothorIndexConstExpiredException
In case of muliple thread sharing one instance of the tanker this method should be synchronized by user as follows, as it returns a wrapped iterator:
synchronized (tanker) {
Sequence<Barrel> elements = tanker.elementsSecure();
...
}
EgothorIndexConstExpiredException - If index constancy expired AND index has changed.public Properties loadState() throws IOException
TankerImplloadState in class TankerImplIOExceptionpublic int getRootVersionID()
getRootVersionID in class Tankerpublic boolean isDirty()
Tankerpublic long deleted()
Grouppublic Sequence<? extends IListMetadata> expand(String expr)
Grouppublic void forEach(Task<Barrel> task)
Grouppublic Bitmap getBitmap(String label)
Barrelpublic CWI getCWI(HashSet<Token> terms)
Grouppublic IListMetadata getIListMeta(String term)
GroupgetIListMeta in interface BarrelgetIListMeta in class Groupterm - the termpublic DocumentData getMeta(long uid)
Grouppublic void iterate(Request<Barrel> task)
Grouppublic void setBitmap(String label, Bitmap bitmap)
BarrelCopyright © 2016 Egothor. All Rights Reserved.