net.sf.dict4j.cache
Class DictSessionWithCache
java.lang.Object
net.sf.dict4j.DictSession
net.sf.dict4j.cache.DictSessionWithCache
public class DictSessionWithCache
- extends DictSession
Methods inherited from class net.sf.dict4j.DictSession |
auth, client, close, define, define, define, getBanner, isClosed, isOpen, isOptionMime, match, match, match, open, quit, setLogAppender, setOptionMime, status |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DictSessionWithCache
public DictSessionWithCache(java.lang.String address,
CacheProvider cacheProvider)
DictSessionWithCache
public DictSessionWithCache(java.lang.String address,
int port,
CacheProvider cacheProvider)
DictSessionWithCache
public DictSessionWithCache(DictTransport transport,
CacheProvider cacheProvider)
setCacheEnabled
public static void setCacheEnabled(boolean cacheEnabled)
help
public java.lang.String help()
- Overrides:
help
in class DictSession
serverInfo
public java.lang.String serverInfo()
- Overrides:
serverInfo
in class DictSession
databaseInfo
public java.lang.String databaseInfo(java.lang.String database)
- Overrides:
databaseInfo
in class DictSession
showDatabases
public java.util.List<Database> showDatabases()
- Overrides:
showDatabases
in class DictSession
showStrategies
public java.util.List<Strategy> showStrategies()
- Overrides:
showStrategies
in class DictSession
define
public java.util.List<Definition> define(java.lang.String word,
java.lang.String database)
- Get definitions of word from given database
- Overrides:
define
in class DictSession
- Parameters:
word
- word to matchdatabase
- database to search
- Returns:
- list of all available word's definitions
match
public java.util.List<DatabaseWord> match(java.lang.String word,
java.lang.String database,
java.lang.String strategy)
- Match word in given database using given strategy
- Overrides:
match
in class DictSession
- Parameters:
word
- word to matchdatabase
- database to search matchesstrategy
- strategy to use for search
- Returns:
- List of database words matched