§ 904. Notice of class action. (a) In class actions brought primarily for injunctive or declaratory relief, notice of the pendency of the action need not be given to the class unless the court finds that notice is necessary to protect the interests of the represented parties and that the cost of notice will not prevent the action from going forward. (b) In all other class actions, reasonable notice of the commencement of a class action shall be given to the class in such manner as the court directs. (c) The content of the notice shall be subject to court approval. In determining the method by which notice is to be given, the court shall consider I. the cost of giving notice by each method considered II. the resources of the parties and III. the stake of each represented member of the class, and the likelihood that significant numbers of represented members would desire to exclude themselves from the class or to appear individually, which may be determined, in the court's discretion, by sending notice to a random sample of the class. (d) I. Preliminary determination of expenses of notification. Unless the court orders otherwise, the plaintiff shall bear the expense of notification. The court may, if justice requires, require that the defendant bear the expense of notification, or may require each of them to bear a part of the expense in proportion to the likelihood that each will prevail upon the merits. The court may hold a preliminary hearing to determine how the costs of notice should be apportioned. II. Final determination. Upon termination of the action by order or judgment, the court may, but shall not be required to, allow to the prevailing party the expenses of notification as taxable disbursements under article eighty-three of the civil practice law and rules.