Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class SimpleResourceRegistry.RegistryValue

java.lang.Object
  extended by com.tangosol.util.SimpleResourceRegistry.RegistryValue

All Implemented Interfaces:
com.oracle.common.base.Disposable
Enclosing class:
SimpleResourceRegistry

protected class SimpleResourceRegistry.RegistryValue
extends java.lang.Object
implements com.oracle.common.base.Disposable

A holder for resource objects and their (optional) respective ResourceLifecycleObservers. The ResourceRegistry.ResourceLifecycleObserver.onRelease(Object) method will be invoked when dispose() is invoked on this object. Furthermore, if the provided resource implements Disposable, its dispose() method will be invoked.


Constructor Summary
SimpleResourceRegistry.RegistryValue(java.lang.Object oResource)
          Construct a SimpleResourceRegistry.RegistryValue object.
SimpleResourceRegistry.RegistryValue(java.lang.Object oResource, ResourceRegistry.ResourceLifecycleObserver observer)
          Construct a SimpleResourceRegistry.RegistryValue object.

 

Method Summary
 void dispose()
          
 ResourceRegistry.ResourceLifecycleObserver getObserver()
          Return the lifecycle observer for the registered resource.
 java.lang.Object getResource()
          Return the registered resource.

 

Constructor Detail

SimpleResourceRegistry.RegistryValue

public SimpleResourceRegistry.RegistryValue(java.lang.Object oResource)
Construct a SimpleResourceRegistry.RegistryValue object.
Parameters:
oResource - the registered resource

SimpleResourceRegistry.RegistryValue

public SimpleResourceRegistry.RegistryValue(java.lang.Object oResource,
                                            ResourceRegistry.ResourceLifecycleObserver observer)
Construct a SimpleResourceRegistry.RegistryValue object.
Parameters:
oResource - the registered resource
observer - the lifecycle observer

Method Detail

getResource

public java.lang.Object getResource()
Return the registered resource.
Returns:
the registered resource

getObserver

public ResourceRegistry.ResourceLifecycleObserver getObserver()
Return the lifecycle observer for the registered resource.
Returns:
the lifecycle observer for the registered resource (may be null)

dispose

public void dispose()
Specified by:
dispose in interface com.oracle.common.base.Disposable

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.