|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aragost.javahg.internals.ServerPool
public class ServerPool
A pool of Server instances. Use take(AbstractCommand) and
put(Server).
Contains up to maxServers servers. When the maximum number of
servers are running commands are queued and queued commands may be cancelled.
| Constructor Summary | |
|---|---|
ServerPool(RepositoryConfiguration conf,
File directory,
boolean performInit,
String cloneUrl)
|
|
| Method Summary | |
|---|---|
void |
decrementRefCount()
Decrement the refCount. |
HgVersion |
getHgVersion(Repository repo)
|
int |
getNumIdleServers()
|
List<Server> |
getServers()
|
void |
incrementRefCount()
Increment the refCount for this server pool. |
CharsetDecoder |
newDecoder()
|
void |
put(Server server)
Return the server to the pool of available servers. |
Server |
take(AbstractCommand command)
Get a server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerPool(RepositoryConfiguration conf,
File directory,
boolean performInit,
String cloneUrl)
| Method Detail |
|---|
public void incrementRefCount()
public void decrementRefCount()
public CharsetDecoder newDecoder()
public Server take(AbstractCommand command)
throws InterruptedException
maxServers a new server is
started. If no servers are available the thread blocks until there is a
server available. Caller must call put(Server) after command is
completed.
InterruptedException - If interrupted while waiting for a server to become free or
the command was cancelled.put(Server)public void put(Server server)
server - The server to returntake(AbstractCommand),
abort(Server)public HgVersion getHgVersion(Repository repo)
public List<Server> getServers()
public int getNumIdleServers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||