test_class.declarator: system
test_class.modifier: static
test_class.original_string: static ActorSystem system;
test_class.type: ActorSystem
test_class.var_name: system
test_class.declarator: leaderSessionID = UUID.randomUUID()
test_class.modifier: static
test_class.original_string: static UUID leaderSessionID = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: leaderSessionID
test_class.file: flink-runtime/src/test/java/org/apache/flink/runtime/instance/InstanceManagerTest.java
test_class.identifier: InstanceManagerTest
test_case.body: @Test
  	public void testShutdown() {
  		try {
  			InstanceManager cm = new InstanceManager();
  			cm.shutdown();
  			
  			try {
  				HardwareDescription resources = HardwareDescription.extractFromSystem(4096);
  				InetAddress address = InetAddress.getByName("127.0.0.1");
  				InstanceConnectionInfo ici = new InstanceConnectionInfo(address, 20000);
  
  				JavaTestKit probe = new JavaTestKit(system);
  				cm.registerTaskManager(probe.getRef(), ici, resources, 1, leaderSessionID);
  				fail("Should raise exception in shutdown state");
  			}
  			catch (IllegalStateException e) {
  				// expected
  			}
  			
  			assertFalse(cm.reportHeartBeat(new InstanceID(), new byte[] {}));
  		}
  		catch (Exception e) {
  			System.err.println(e.getMessage());
  			e.printStackTrace();
  			Assert.fail("Test erroneous: " + e.getMessage());
  		}
  	}
test_case.class_method_signature: InstanceManagerTest.testShutdown()
test_case.full_signature: @Test public void testShutdown()
test_case.identifier: testShutdown
test_case.invocations: shutdown extractFromSystem getByName registerTaskManager getRef fail assertFalse reportHeartBeat println getMessage printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShutdown()
focal_class.declarator: LOG = LoggerFactory.getLogger(InstanceManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(InstanceManager.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: lock = new Object()
focal_class.modifier: private final
focal_class.original_string: private final Object lock = new Object();
focal_class.type: Object
focal_class.var_name: lock
focal_class.declarator: registeredHostsById
focal_class.modifier: private final
focal_class.original_string: private final Map<InstanceID, Instance> registeredHostsById;
focal_class.type: Map<InstanceID, Instance>
focal_class.var_name: registeredHostsById
focal_class.declarator: registeredHostsByConnection
focal_class.modifier: private final
focal_class.original_string: private final Map<ActorRef, Instance> registeredHostsByConnection;
focal_class.type: Map<ActorRef, Instance>
focal_class.var_name: registeredHostsByConnection
focal_class.declarator: deadHosts
focal_class.modifier: private final
focal_class.original_string: private final Set<ActorRef> deadHosts;
focal_class.type: Set<ActorRef>
focal_class.var_name: deadHosts
focal_class.declarator: instanceListeners = new ArrayList<InstanceListener>()
focal_class.modifier: private final
focal_class.original_string: private final List<InstanceListener> instanceListeners = new ArrayList<InstanceListener>();
focal_class.type: List<InstanceListener>
focal_class.var_name: instanceListeners
focal_class.declarator: totalNumberOfAliveTaskSlots
focal_class.modifier: private
focal_class.original_string: private int totalNumberOfAliveTaskSlots;
focal_class.type: int
focal_class.var_name: totalNumberOfAliveTaskSlots
focal_class.declarator: isShutdown
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean isShutdown;
focal_class.type: boolean
focal_class.var_name: isShutdown
focal_class.file: flink-runtime/src/main/java/org/apache/flink/runtime/instance/InstanceManager.java
focal_class.identifier: InstanceManager
focal_class.class_method_signature: InstanceManager.InstanceManager()
focal_class.full_signature: public  InstanceManager()
focal_class.identifier: InstanceManager
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  InstanceManager()
focal_class.class_method_signature: InstanceManager.shutdown()
focal_class.full_signature: public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: InstanceManager.reportHeartBeat(InstanceID instanceId, byte[] lastMetricsReport)
focal_class.full_signature: public boolean reportHeartBeat(InstanceID instanceId, byte[] lastMetricsReport)
focal_class.identifier: reportHeartBeat
focal_class.modifiers: public
focal_class.parameters: (InstanceID instanceId, byte[] lastMetricsReport)
focal_class.return: boolean
focal_class.signature: boolean reportHeartBeat(InstanceID instanceId, byte[] lastMetricsReport)
focal_class.class_method_signature: InstanceManager.registerTaskManager(
  			ActorRef taskManager,
  			InstanceConnectionInfo connectionInfo,
  			HardwareDescription resources,
  			int numberOfSlots,
  			UUID leaderSessionID)
focal_class.full_signature: public InstanceID registerTaskManager(
  			ActorRef taskManager,
  			InstanceConnectionInfo connectionInfo,
  			HardwareDescription resources,
  			int numberOfSlots,
  			UUID leaderSessionID)
focal_class.identifier: registerTaskManager
focal_class.modifiers: public
focal_class.parameters: (
  			ActorRef taskManager,
  			InstanceConnectionInfo connectionInfo,
  			HardwareDescription resources,
  			int numberOfSlots,
  			UUID leaderSessionID)
focal_class.return: InstanceID
focal_class.signature: InstanceID registerTaskManager(
  			ActorRef taskManager,
  			InstanceConnectionInfo connectionInfo,
  			HardwareDescription resources,
  			int numberOfSlots,
  			UUID leaderSessionID)
focal_class.class_method_signature: InstanceManager.unregisterTaskManager(ActorRef taskManager, boolean terminated)
focal_class.full_signature: public void unregisterTaskManager(ActorRef taskManager, boolean terminated)
focal_class.identifier: unregisterTaskManager
focal_class.modifiers: public
focal_class.parameters: (ActorRef taskManager, boolean terminated)
focal_class.return: void
focal_class.signature: void unregisterTaskManager(ActorRef taskManager, boolean terminated)
focal_class.class_method_signature: InstanceManager.unregisterAllTaskManagers()
focal_class.full_signature: public void unregisterAllTaskManagers()
focal_class.identifier: unregisterAllTaskManagers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void unregisterAllTaskManagers()
focal_class.class_method_signature: InstanceManager.isRegistered(ActorRef taskManager)
focal_class.full_signature: public boolean isRegistered(ActorRef taskManager)
focal_class.identifier: isRegistered
focal_class.modifiers: public
focal_class.parameters: (ActorRef taskManager)
focal_class.return: boolean
focal_class.signature: boolean isRegistered(ActorRef taskManager)
focal_class.class_method_signature: InstanceManager.getNumberOfRegisteredTaskManagers()
focal_class.full_signature: public int getNumberOfRegisteredTaskManagers()
focal_class.identifier: getNumberOfRegisteredTaskManagers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfRegisteredTaskManagers()
focal_class.class_method_signature: InstanceManager.getTotalNumberOfSlots()
focal_class.full_signature: public int getTotalNumberOfSlots()
focal_class.identifier: getTotalNumberOfSlots
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTotalNumberOfSlots()
focal_class.class_method_signature: InstanceManager.getNumberOfAvailableSlots()
focal_class.full_signature: public int getNumberOfAvailableSlots()
focal_class.identifier: getNumberOfAvailableSlots
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfAvailableSlots()
focal_class.class_method_signature: InstanceManager.getAllRegisteredInstances()
focal_class.full_signature: public Collection<Instance> getAllRegisteredInstances()
focal_class.identifier: getAllRegisteredInstances
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<Instance>
focal_class.signature: Collection<Instance> getAllRegisteredInstances()
focal_class.class_method_signature: InstanceManager.getRegisteredInstanceById(InstanceID instanceID)
focal_class.full_signature: public Instance getRegisteredInstanceById(InstanceID instanceID)
focal_class.identifier: getRegisteredInstanceById
focal_class.modifiers: public
focal_class.parameters: (InstanceID instanceID)
focal_class.return: Instance
focal_class.signature: Instance getRegisteredInstanceById(InstanceID instanceID)
focal_class.class_method_signature: InstanceManager.getRegisteredInstance(ActorRef ref)
focal_class.full_signature: public Instance getRegisteredInstance(ActorRef ref)
focal_class.identifier: getRegisteredInstance
focal_class.modifiers: public
focal_class.parameters: (ActorRef ref)
focal_class.return: Instance
focal_class.signature: Instance getRegisteredInstance(ActorRef ref)
focal_class.class_method_signature: InstanceManager.addInstanceListener(InstanceListener listener)
focal_class.full_signature: public void addInstanceListener(InstanceListener listener)
focal_class.identifier: addInstanceListener
focal_class.modifiers: public
focal_class.parameters: (InstanceListener listener)
focal_class.return: void
focal_class.signature: void addInstanceListener(InstanceListener listener)
focal_class.class_method_signature: InstanceManager.removeInstanceListener(InstanceListener listener)
focal_class.full_signature: public void removeInstanceListener(InstanceListener listener)
focal_class.identifier: removeInstanceListener
focal_class.modifiers: public
focal_class.parameters: (InstanceListener listener)
focal_class.return: void
focal_class.signature: void removeInstanceListener(InstanceListener listener)
focal_class.class_method_signature: InstanceManager.notifyNewInstance(Instance instance)
focal_class.full_signature: private void notifyNewInstance(Instance instance)
focal_class.identifier: notifyNewInstance
focal_class.modifiers: private
focal_class.parameters: (Instance instance)
focal_class.return: void
focal_class.signature: void notifyNewInstance(Instance instance)
focal_class.class_method_signature: InstanceManager.notifyDeadInstance(Instance instance)
focal_class.full_signature: private void notifyDeadInstance(Instance instance)
focal_class.identifier: notifyDeadInstance
focal_class.modifiers: private
focal_class.parameters: (Instance instance)
focal_class.return: void
focal_class.signature: void notifyDeadInstance(Instance instance)
focal_method.body: public void shutdown() {
  		synchronized (this.lock) {
  			if (this.isShutdown) {
  				return;
  			}
  			this.isShutdown = true;
  
  			for (Instance i : this.registeredHostsById.values()) {
  				i.markDead();
  			}
  
  			this.registeredHostsById.clear();
  			this.registeredHostsByConnection.clear();
  			this.deadHosts.clear();
  			this.totalNumberOfAliveTaskSlots = 0;
  		}
  	}
focal_method.class_method_signature: InstanceManager.shutdown()
focal_method.full_signature: public void shutdown()
focal_method.identifier: shutdown
focal_method.invocations: values markDead clear clear clear
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void shutdown()