X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fconcepts%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fconcepts%2FObjectRegistration.java;h=ca0ce1e76cbd2d5660a03986a4758efb3783775d;hb=b63f01cde253e7f721494b583680bfc3814d2750;hp=7725829fc23f561544ac25708d360175b2a8274b;hpb=194f04e062a382cd234ac3f8e1b69f269de0b8fb;p=yangtools.git diff --git a/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/ObjectRegistration.java b/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/ObjectRegistration.java index 7725829fc2..ca0ce1e76c 100644 --- a/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/ObjectRegistration.java +++ b/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/ObjectRegistration.java @@ -7,29 +7,21 @@ */ package org.opendaylight.yangtools.concepts; +import javax.annotation.Nonnull; + /** - * Class representing a registration of an object. Such a registration is - * a proper resource and should be cleaned up when no longer required, so - * references to the object can be removed. This mechanism lies above the - * usual Java reference mechanism, as the entity where the object is - * registered may reside outside of the Java Virtual Machine. + * Class representing a registration of an object. Such a registration is a proper resource and should be cleaned up + * when no longer required, so references to the object can be removed. This mechanism lies above the usual Java + * reference mechanism, as the entity where the object is registered may reside outside of the Java Virtual Machine. */ -public interface ObjectRegistration extends Registration { +public interface ObjectRegistration extends Registration { /** * Return the object instance. * * @return Registered object. */ - @Override - T getInstance(); + @Nonnull T getInstance(); - /** - * 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. - */ @Override - void close() throws Exception; + void close(); }