Class NoOpObjectRegistration<T>
java.lang.Object
org.opendaylight.yangtools.concepts.NoOpObjectRegistration<T>
- Type Parameters:
T
- Type of registered object
- All Implemented Interfaces:
AutoCloseable
,Immutable
,ObjectRegistration<T>
,Registration
@NonNullByDefault
public class NoOpObjectRegistration<T>
extends Object
implements Immutable, ObjectRegistration<T>
Implementation of
ObjectRegistration
which does nothing in its close()
method.-
Method Details
-
of
-
getInstance
Description copied from interface:ObjectRegistration
Return the object instance.- Specified by:
getInstance
in interfaceObjectRegistration<T>
- Returns:
- Registered object.
-
close
public final void close()Description copied from interface:Registration
Unregisters the object. This operation is required not to invoke blocking operations. Implementations which require interaction with outside world must provide guarantees that any work is done behind the scenes and the unregistration process looks as if it has already succeeded once this method returns.The above requirement does not necessarily mean that all interactions with the registered entity seize before this method returns, but they should complete within a reasonable time frame.
While the interface contract allows an implementation to ignore the occurrence of RuntimeExceptions, implementations are strongly encouraged to deal with such exceptions internally and to ensure invocations of this method do not fail in such circumstances.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRegistration
-
toString
-