Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.emf.transaction.util
Class BasicTransactionOptionMetadataRegistry


java.lang.Object
  extended by 

java.util.AbstractMap<K,V>
      extended by 

java.util.concurrent.ConcurrentHashMap<
Object,
Transaction.OptionMetadata>
          extended by 
org.eclipse.emf.transaction.util.BasicTransactionOptionMetadataRegistry
All Implemented Interfaces:
Serializable, ConcurrentMap< Object, Transaction.OptionMetadata>, Map< Object, Transaction.OptionMetadata>, Transaction.OptionMetadata.Registry

public class BasicTransactionOptionMetadataRegistry
extends ConcurrentHashMap< Object, Transaction.OptionMetadata>
implements Transaction.OptionMetadata.Registry

A simple implementation of the transaction option metadata registry API.

Since:
1.3
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util. Map
Map.Entry< K, V>
 
Field Summary
 
Fields inherited from interface org.eclipse.emf.transaction. Transaction.OptionMetadata.Registry
INSTANCE
 
Constructor Summary
  BasicTransactionOptionMetadataRegistry ()
          Initializes me with the shared registry instance as my delegate.
protected BasicTransactionOptionMetadataRegistry ( Transaction.OptionMetadata.Registry delegate)
          Initializes me with a registry to which I delegate options that I do not provide for.
 
Method Summary
protected   Transaction.OptionMetadata basicGetOptionMetadata ( Object option)
          Gets the specified option's metadata, possibly from a delegate, without lazily creating and caching a result for unrecognized options.
protected   Transaction.OptionMetadata delegatedGetOptionMetadata ( Object option)
           
  Transaction.OptionMetadata getOptionMetadata ( Object option)
           Obtains a metadata object describing the specified transaction option. This implementation caches, locally, the lazily created metadata for options that are unrecognized.
  Transaction.OptionMetadata register ( Transaction.OptionMetadata metadata)
          Registers an option metadata descriptor.
 
Methods inherited from class java.util.concurrent. ConcurrentHashMap
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
 
Methods inherited from class java.util. AbstractMap
clone, equals, hashCode, toString
 
Methods inherited from class java.lang. Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util. Map
equals, hashCode
 

Constructor Detail

BasicTransactionOptionMetadataRegistry

public BasicTransactionOptionMetadataRegistry()
Initializes me with the shared registry instance as my delegate.


BasicTransactionOptionMetadataRegistry

protected BasicTransactionOptionMetadataRegistry(
Transaction.OptionMetadata.Registry delegate)
Initializes me with a registry to which I delegate options that I do not provide for.

Parameters:
delegate - my delegate
Method Detail

getOptionMetadata

public 
Transaction.OptionMetadata getOptionMetadata(
Object option)

Obtains a metadata object describing the specified transaction option. For unrecognized options, a default meta-data is provided that gives reasonable answers.

This implementation caches, locally, the lazily created metadata for options that are unrecognized.

Specified by:
getOptionMetadata in interface Transaction.OptionMetadata.Registry
Parameters:
option - an option key
Returns:
the option meta-data (never null)

basicGetOptionMetadata

protected 
Transaction.OptionMetadata basicGetOptionMetadata(
Object option)
Gets the specified option's metadata, possibly from a delegate, without lazily creating and caching a result for unrecognized options.

Parameters:
option - the option
Returns:
its metadata, or null if none is found in either the local or the delegate registry

delegatedGetOptionMetadata

protected 
Transaction.OptionMetadata delegatedGetOptionMetadata(
Object option)

register

public 
Transaction.OptionMetadata register(
Transaction.OptionMetadata metadata)
Registers an option metadata descriptor.

Parameters:
metadata - the option metadata to register
Returns:
the metadata displaced by the new object, if previously we had a descriptor for the same option, otherwise null

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire