SMILA 1.0 API documentation

org.eclipse.smila.connectivity.deltaindexing.impl
Class DataSourceConnection

java.lang.Object
  extended by org.eclipse.smila.connectivity.deltaindexing.impl.DataSourceConnection
All Implemented Interfaces:
java.io.Serializable

public class DataSourceConnection
extends java.lang.Object
implements java.io.Serializable

The Class DataSourceConnection.

See Also:
Serialized Form

Constructor Summary
DataSourceConnection(java.lang.String dataSourceId)
          Instantiates a new data source connection.
 
Method Summary
 void addSubCompound(ConnectivityId parentId, ConnectivityId subCompoundId)
          Add a sub compound mapping.
 void clear()
          Clear.
 void delete(ConnectivityId id)
          Delete.
 void forceUnlockAndClear()
          Force unlock and clear.
 void forceUnlockAndRollback()
          Force unlock and rollback.
 java.lang.String getDataSourceId()
          Gets the data source id.
 long getEntryCount()
          Returns the number of entries in the index.
 java.lang.String getHash(ConnectivityId id)
          Gets the hash.
 java.lang.String getSessionId()
          Gets the session id.
 java.util.Set<ConnectivityId> getSubCompounds(ConnectivityId id)
          Returns the Set of sub compounds or null if none exists.
 void lock(java.lang.String sessionId)
          Lock.
 java.util.Iterator<ConnectivityId> obsoleteIdIterator()
          Obsolete id iterator.
 void put(ConnectivityId id)
          Put.
 void put(ConnectivityId id, java.lang.String hash, boolean isCompound)
          Put.
 void removeSubCompound(ConnectivityId id)
          Removes the mapping for an id, cleaning up the mapped set, too.
 void rollback()
          Clear.
 void unlock()
          Unlock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceConnection

public DataSourceConnection(java.lang.String dataSourceId)
Instantiates a new data source connection.

Parameters:
dataSourceId - the data source id
Method Detail

lock

public void lock(java.lang.String sessionId)
          throws DeltaIndexingException
Lock.

Parameters:
sessionId - the id of the session
Throws:
DeltaIndexingException - the delta indexing exception

unlock

public void unlock()
            throws DeltaIndexingException
Unlock.

Throws:
DeltaIndexingException - the delta indexing exception

put

public void put(ConnectivityId id)
         throws DeltaIndexingException
Put.

Parameters:
id - the id
Throws:
DeltaIndexingException - the delta indexing exception

put

public void put(ConnectivityId id,
                java.lang.String hash,
                boolean isCompound)
         throws DeltaIndexingException
Put.

Parameters:
id - the id
hash - the hash
isCompound - boolean flag if the record identified by id is a compound record (true) or not (false)
Throws:
DeltaIndexingException - the delta indexing exception

getHash

public java.lang.String getHash(ConnectivityId id)
                         throws DeltaIndexingException
Gets the hash.

Parameters:
id - the id
Returns:
the hash
Throws:
DeltaIndexingException - the delta indexing exception

obsoleteIdIterator

public java.util.Iterator<ConnectivityId> obsoleteIdIterator()
                                                      throws DeltaIndexingException
Obsolete id iterator.

Returns:
the iterator< id>
Throws:
DeltaIndexingException - the delta indexing exception

delete

public void delete(ConnectivityId id)
            throws DeltaIndexingException
Delete.

Parameters:
id - the id
Throws:
DeltaIndexingException - the delta indexing exception

rollback

public void rollback()
              throws DeltaIndexingException
Clear.

Throws:
DeltaIndexingException - the delta indexing exception

clear

public void clear()
           throws DeltaIndexingException
Clear.

Throws:
DeltaIndexingException - the delta indexing exception

forceUnlockAndRollback

public void forceUnlockAndRollback()
                            throws DeltaIndexingException
Force unlock and rollback.

Throws:
DeltaIndexingException - the delta indexing exception

forceUnlockAndClear

public void forceUnlockAndClear()
                         throws DeltaIndexingException
Force unlock and clear.

Throws:
DeltaIndexingException - the delta indexing exception

addSubCompound

public void addSubCompound(ConnectivityId parentId,
                           ConnectivityId subCompoundId)
Add a sub compound mapping.

Parameters:
parentId - the parent Id
subCompoundId - the sub compound id

getSubCompounds

public java.util.Set<ConnectivityId> getSubCompounds(ConnectivityId id)
Returns the Set of sub compounds or null if none exists.

Parameters:
id - the id to get the sub compounds for
Returns:
the Set of sub compounds or null if none exists

removeSubCompound

public void removeSubCompound(ConnectivityId id)
Removes the mapping for an id, cleaning up the mapped set, too.

Parameters:
id - the id to remove the mapping for

getDataSourceId

public java.lang.String getDataSourceId()
Gets the data source id.

Returns:
the data source id

getSessionId

public java.lang.String getSessionId()
Gets the session id.

Returns:
the session id

getEntryCount

public long getEntryCount()
Returns the number of entries in the index.

Returns:
the number of entries in the index

SMILA 1.0 API documentation