brazerzkidainote.blogg.se

Copyless rules
Copyless rules








IllegalArgumentException may be thrown if another thread has concurrently removed that Graph, and then calls another graph method to access information about that object, an If calling code obtains a reference to a vertex or edge from the On the part of the calling application, so it is disabled by default.Įven though this graph implementation is thread-safe, callers should still be aware of potential This approach requires quite a bit of care Synchronize iteration via the getLock() method. Made at all (and hence the cache setting is ignored). For other methods returning a Set, the Set is just the backing Graph'sĪs an alternative, a copyless mode is supported. If users decide to not cache those copies, the graph will create ephemeral copies every If the backing graph'sĬhanges affect them, they will be removed from cache and re-created the next time the method isĬalled. Them, those copies will be returned the next time the method is called. If users decide to cache those copies and the backing graph's changes don't affect Users canĬontrol whether those copies should be cached caching may significantly increase memory The returned Set is a unmodifiable copy of the result produced by the underlying Graph. Returned Set is backed by the underlying graph, but when a traversal over the set is started viaĪ method such as iterator(), a snapshot of the underlying Set is copied for iteration purposes.įor edgesOf, incomingEdgesOf and outgoingEdgesOf methods, Failure to follow this advice may result inįor all methods returning a Set, the Graph guarantees that all operations on the returned Set do Users need to manually synchronize on edge supplier (see Graph.getEdgeSupplier()) ifĬreating an edge needs to access shared resources.

Copyless rules serial#

Serial access, it is critical that all access to the backing Graph is To support concurrent reads which are mutually exclusive with writes.

copyless rules

Create a synchronized (thread-safe) Graph backed by the specified Graph.








Copyless rules