org.eclipse.emf.cdo.core
Interface OIDEncoder

All Superinterfaces:
org.eclipse.net4j.spring.Loggable, org.eclipse.net4j.spring.Service
All Known Implementing Classes:
OIDEncoderImpl

public interface OIDEncoder
extends org.eclipse.net4j.spring.Service

Converts between the external and configurable internal representations of an object identifier (OID).

Note: An OIDEncoder service is needed both at server and at client side. Their bit mask configurations have to be identical under all circumstances! Exactly one OIDEncoder service is used by a CDO Mapper service. It's configuration must match the needs of all applications using this Mapper service.


Method Summary
 long getOID(int rid, long oidFragment)
          Computes the packed OID from a given RID and OID fragment.
 long getOIDFragment(long oid)
          Extracts the OID fragment from a packed OID.
 int getRID(long oid)
          Extracts the RID from a packed OID.
 java.lang.String toString(int rid, long oidFragment)
          Computes the string representation of an OID.
 java.lang.String toString(long oid)
          Computes the string representation of an OID.
 
Methods inherited from interface org.eclipse.net4j.spring.Service
addStateListener, dump, getState, isActive, isAutoStart, isStarted, removeStateListener, start, stop, testSetState
 
Methods inherited from interface org.eclipse.net4j.spring.Loggable
debug, debug, error, error, fatal, fatal, getBeanName, getChild, getContainer, getFullBeanName, getLogger, info, info, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isWarnEnabled, warn, warn
 

Method Detail

getRID

int getRID(long oid)
Extracts the RID from a packed OID.

Parameters:
oid - The OID value to extract the RID from.
Returns:
The extracted RID value.

getOIDFragment

long getOIDFragment(long oid)
Extracts the OID fragment from a packed OID.

Parameters:
oid - The OID value to extract the OID fragment from.
Returns:
The extracted OID fragment value.

getOID

long getOID(int rid,
            long oidFragment)
Computes the packed OID from a given RID and OID fragment.

Parameters:
rid - The RID part.
oidFragment - The OID fragment part.
Returns:
The packed OID value

toString

java.lang.String toString(int rid,
                          long oidFragment)
Computes the string representation of an OID.

Parameters:
rid - The RID part of the OID.
oidFragment - The OID fragment part of the OID.
Returns:
The string representation of the OID.

toString

java.lang.String toString(long oid)
Computes the string representation of an OID.

Parameters:
oid - The packed OID value.
Returns:
The string representation of the OID.

Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
All Rights Reserved.