/*
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.yangtools.concepts;

public interface Registration<T> extends AutoCloseable {

    T getInstance();

    /**
     * Unregisters object
     * 
     */
    @Override
    public void close() throws Exception;
}

@@ -1,11 +1,10 @@
 /*
-%0D
 %0A * Copy
@@ -75,13 +75,11 @@
 ved.
-%0D
 %0A *
-%0D
 %0A * 
@@ -150,17 +150,16 @@
 nder the
-%0D
 %0A * term
@@ -231,17 +231,16 @@
 ibution,
-%0D
 %0A * and 
@@ -300,14 +300,12 @@
 html
-%0D
 %0A */
-%0D
 %0Apac
@@ -349,71 +349,519 @@
 pts;
-%0D%0A%0D%0Apublic interface Registration%3CT%3E extends AutoCloseable %7B%0D%0A%0D
+%0A%0A/**%0A * Class representing a registration of an object. Such a registration is%0A * a proper resource and should be cleaned up when no longer required, so%0A * references to the object can be removed. This mechanism lies above the%0A * usual Java reference mechanism, as the entity where the object is%0A * registered may reside outside of the Java Virtual Machine.%0A */%0Apublic interface Registration%3CT%3E extends AutoCloseable %7B%0A    /**%0A     * Return the object instance.%0A     *%0A     * @return Registered object.%0A     */
 %0A   
@@ -881,19 +881,17 @@
 e();
-%0D%0A%0D
+%0A
 %0A    /**
 %0D%0A  
@@ -886,17 +886,16 @@
 %0A    /**
-%0D
 %0A     * 
@@ -910,59 +910,354 @@
 ers 
+the 
 object
-%0D%0A     * %0D%0A     */%0D%0A    @Override%0D%0A    public
+. This operation is required not to invoke%0A     * blocking operations. Implementations which require interaction%0A     * with outside world must provide guarantees that any work is done%0A     * behind the scenes and the unregistration process looks as if it%0A     * has already succeeded once this method returns.%0A     */%0A    @Override%0A   
  voi
@@ -1287,9 +1287,7 @@
 ion;
-%0D
 %0A%7D
-%0D
 %0A

Add registration interface contract definition