I assume you are referring to the set_state method (not set_node). If not, let me know which set_node method you are referring to.
void ITCMLocalLB::Node::set_availability(
in IPPortDefinition[] node_defs,
in AvailabilityState state
);
set_availability is used to "drain" connections from the node. If sessions are enabled, the BIG-IP sends traffic to the node as usual based on the load balancing method you chose. If sessions are disabled, no new sessions can be sent to the node. Clients with persistent connections remain connected to the node and can start new sessions until they timeout based on the persistence setting for the pool the node is a member of.
void ITCMLocalLB::Node::set_state(
in IPPortDefinition[] node_defs,
in EnabledState state
);
set_state() is used to enable or disable all connections to the node. setting the state to STATE_DISABLED will act as a Forced down state and current active sessions will be disconnected. To cleanly terminate all sessions to a node and take down a node it is recommended to set the availability to AVAILABILITY_DOWN (with set_availability) and wait until the current connections to the node reaches zero. At that point set the state to STATE_DISABLED (with set_state) to take the node completely offline.
-Joe