public NodeGrantDatabaseStorageInterface::write(NodeInterface $node, array $grants, $realm = NULL, $delete = TRUE)
Writes a list of grants to the database, deleting previously saved ones.
If a realm is provided, it will only delete grants from that realm, but it will always delete a grant from the 'all' realm. Modules that use node access can use this method when doing mass updates due to widespread permission changes.
Note: Don't call this method directly from a contributed module. Call \Drupa