1 package com
.google
.appengine
.tools
.development
;
4 * Holder for per server instance state.
6 interface InstanceHolder
{
9 * Returns the {@link ContainerService} for this instance.
11 ContainerService
getContainerService();
14 * Returns the id for this instance.
19 * Returns true if this is the main instance, meaning the load balancing
20 * instance for a {@link ManualServer} and the only instance for an
21 * {@link AutomaticServer}.
23 boolean isMainInstance();
26 * Starts the instance.
28 void startUp() throws Exception
;
31 * Acquire a serving permit for this instance. This may block and have side effects such as
32 * sending a startUp request.
34 boolean acquireServingPermit();
37 * Returns true if this instance is a load balancing server.
39 boolean isServerLoadBalancingServer();
42 * Returns true if this instance expects an internally generated
43 * "_ah/start" requests to be sent.
45 boolean expectsGeneratedStartRequest();
48 * Returns true if this instance is in the STOPPED state.
53 * Creates a network connection for this instance.
56 public void createConnection() throws Exception
;