|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.blur.server.BlurServerContext
org.apache.blur.server.ShardServerContext
public class ShardServerContext
The thrift session that will hold index reader references to maintain across query and fetch calls. Since there is a fixed size thread pool issuing calls that involve the _threadsToContext map where Thread is the key we don't need to clear or reset threads.
Constructor Summary | |
---|---|
ShardServerContext(SocketAddress localSocketAddress,
SocketAddress remoteSocketAddress)
|
Method Summary | |
---|---|
void |
close()
Closes this context, this happens when the client closes it's connect to the server. |
static void |
closeQuietly(Closeable closeable)
|
IndexSearcherClosable |
getIndexSearcherClosable(String table,
String shard)
Gets the cached IndexSearcherClosable (if any) for the given table
and shard. |
static ShardServerContext |
getShardServerContext()
Gets the ShardServerContext for this Thread . |
static void |
registerContextForCall(ShardServerContext context)
Registers the ShardServerContext for this thread. |
void |
reset()
Resets the ShardServerContext by closing the searchers. |
static void |
resetSearchers()
Resets the context, this closes and releases the index readers. |
void |
setIndexSearcherClosable(String table,
String shard,
IndexSearcherClosable searcher)
Sets the index searcher for this ShardServerContext for the given
table and shard. |
Methods inherited from class org.apache.blur.server.BlurServerContext |
---|
getConnectionString, getRemoteSocketAddress, getRocalSocketAddress, getTracer, getTraceRequestId, getTraceRootId, getUser, resetTraceIds, setTraceRequestId, setTraceRootId, setUser |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShardServerContext(SocketAddress localSocketAddress, SocketAddress remoteSocketAddress)
Method Detail |
---|
public static void registerContextForCall(ShardServerContext context)
ShardServerContext
for this thread.
context
- the ShardServerContext
.public static ShardServerContext getShardServerContext()
ShardServerContext
for this Thread
.
ShardServerContext
.public static void resetSearchers()
public void close()
public void reset()
ShardServerContext
by closing the searchers.
public static void closeQuietly(Closeable closeable)
public IndexSearcherClosable getIndexSearcherClosable(String table, String shard)
IndexSearcherClosable
(if any) for the given table
and shard.
table
- the stable name.shard
- the shard name.
IndexSearcherClosable
or null if not present.public void setIndexSearcherClosable(String table, String shard, IndexSearcherClosable searcher) throws IOException
ShardServerContext
for the given
table and shard.
table
- the table name.shard
- the shard name.searcher
- the IndexSearcherClosable
.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |