Class NoOpObjectRegistration<T>
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.NoOpObjectRegistration<T>
-
- Type Parameters:
T
- Type of registered object
- All Implemented Interfaces:
AutoCloseable
,Immutable
,MutationBehaviour<Immutable>
,ObjectRegistration<T>
,Registration
- Direct Known Subclasses:
NoOpListenerRegistration
@Beta @NonNullByDefault public class NoOpObjectRegistration<T> extends Object implements Immutable, ObjectRegistration<T>
Implementation ofObjectRegistration
which does nothing in itsclose()
method.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Unregisters the object.T
getInstance()
Return the object instance.static <T> ObjectRegistration<T>
of(T instance)
String
toString()
-
-
-
Method Detail
-
of
public static <T> ObjectRegistration<T> of(T instance)
-
getInstance
public final T 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.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRegistration
-
-