org.safehaus.penrose.connector
Class Connector

java.lang.Object
  extended byorg.safehaus.penrose.connector.Connector

public class Connector
extends java.lang.Object

Author:
Endi S. Dewata

Field Summary
static java.lang.String DEFAULT_CACHE_CLASS
           
 
Constructor Summary
Connector()
           
 
Method Summary
 int add(Partition partition, SourceConfig sourceConfig, AttributeValues sourceValues)
           
 void addPartition(Partition partition)
           
 int bind(Partition partition, SourceConfig sourceConfig, EntryMapping entry, Row pk, java.lang.String password)
           
 java.util.Collection createModifications(AttributeValues oldValues, AttributeValues newValues)
           
 int delete(Partition partition, SourceConfig sourceConfig, AttributeValues sourceValues)
           
 void fullLoad(Partition partition, SourceConfig sourceConfig, Filter filter, PenroseSearchResults results)
          Load then store in data cache.
 Connection getConnection(Partition partition, java.lang.String name)
           
 ConnectionManager getConnectionManager()
           
 ConnectorConfig getConnectorConfig()
           
 MRSWLock getLock(SourceConfig sourceConfig)
           
 PartitionManager getPartitionManager()
           
 PenroseConfig getServerConfig()
           
 SourceCache getSourceCache()
           
 ThreadManager getThreadManager()
           
 void init()
           
 boolean isStopping()
           
 void load(Partition partition, SourceConfig sourceConfig, java.util.Collection pks, PenroseSearchResults results)
          Check data cache then load.
 int modify(Partition partition, SourceConfig sourceConfig, AttributeValues oldSourceValues, AttributeValues newSourceValues)
           
 Row normalize(Row row)
           
 void performLoad(Partition partition, SourceConfig sourceConfig, Filter filter, PenroseSearchResults results)
          Perform the load operation.
 void performSearch(Partition partition, SourceConfig sourceConfig, Filter filter, PenroseSearchResults results)
          Perform the search operation.
 void retrieve(Partition partition, SourceConfig sourceConfig, java.util.Collection keys, PenroseSearchResults sr)
          Load then store in data cache.
 void search(Partition partition, SourceConfig sourceConfig, Filter filter, PenroseSearchResults results)
          Search the data sources.
 void searchAndLoad(Partition partition, SourceConfig sourceConfig, Filter filter, PenroseSearchResults results)
          Check query cache, peroform search, store results in query cache.
 void setConnectionManager(ConnectionManager connectionManager)
           
 void setConnectorConfig(ConnectorConfig connectorConfig)
           
 void setPartitionManager(PartitionManager partitionManager)
           
 void setPenroseConfig(PenroseConfig penroseConfig)
           
 void setSourceCache(SourceCache sourceCache)
           
 void setThreadManager(ThreadManager threadManager)
           
 void start()
           
 void stop()
           
 Row store(SourceConfig sourceConfig, AttributeValues sourceValues)
           
 void store(SourceConfig sourceConfig, java.util.Collection values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_CLASS

public static final java.lang.String DEFAULT_CACHE_CLASS
Constructor Detail

Connector

public Connector()
Method Detail

init

public void init()
          throws java.lang.Exception
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

isStopping

public boolean isStopping()

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

getPartitionManager

public PartitionManager getPartitionManager()

setPartitionManager

public void setPartitionManager(PartitionManager partitionManager)
                         throws java.lang.Exception
Throws:
java.lang.Exception

addPartition

public void addPartition(Partition partition)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getConnection

public Connection getConnection(Partition partition,
                                java.lang.String name)
                         throws java.lang.Exception
Throws:
java.lang.Exception

normalize

public Row normalize(Row row)
              throws java.lang.Exception
Throws:
java.lang.Exception

getLock

public MRSWLock getLock(SourceConfig sourceConfig)

bind

public int bind(Partition partition,
                SourceConfig sourceConfig,
                EntryMapping entry,
                Row pk,
                java.lang.String password)
         throws java.lang.Exception
Throws:
java.lang.Exception

add

public int add(Partition partition,
               SourceConfig sourceConfig,
               AttributeValues sourceValues)
        throws java.lang.Exception
Throws:
java.lang.Exception

delete

public int delete(Partition partition,
                  SourceConfig sourceConfig,
                  AttributeValues sourceValues)
           throws java.lang.Exception
Throws:
java.lang.Exception

modify

public int modify(Partition partition,
                  SourceConfig sourceConfig,
                  AttributeValues oldSourceValues,
                  AttributeValues newSourceValues)
           throws java.lang.Exception
Throws:
java.lang.Exception

createModifications

public java.util.Collection createModifications(AttributeValues oldValues,
                                                AttributeValues newValues)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

search

public void search(Partition partition,
                   SourceConfig sourceConfig,
                   Filter filter,
                   PenroseSearchResults results)
            throws java.lang.Exception
Search the data sources.

Throws:
java.lang.Exception

searchAndLoad

public void searchAndLoad(Partition partition,
                          SourceConfig sourceConfig,
                          Filter filter,
                          PenroseSearchResults results)
                   throws java.lang.Exception
Check query cache, peroform search, store results in query cache.

Throws:
java.lang.Exception

fullLoad

public void fullLoad(Partition partition,
                     SourceConfig sourceConfig,
                     Filter filter,
                     PenroseSearchResults results)
              throws java.lang.Exception
Load then store in data cache.

Throws:
java.lang.Exception

load

public void load(Partition partition,
                 SourceConfig sourceConfig,
                 java.util.Collection pks,
                 PenroseSearchResults results)
          throws java.lang.Exception
Check data cache then load.

Throws:
java.lang.Exception

retrieve

public void retrieve(Partition partition,
                     SourceConfig sourceConfig,
                     java.util.Collection keys,
                     PenroseSearchResults sr)
              throws java.lang.Exception
Load then store in data cache.

Throws:
java.lang.Exception

store

public Row store(SourceConfig sourceConfig,
                 AttributeValues sourceValues)
          throws java.lang.Exception
Throws:
java.lang.Exception

store

public void store(SourceConfig sourceConfig,
                  java.util.Collection values)
           throws java.lang.Exception
Throws:
java.lang.Exception

performSearch

public void performSearch(Partition partition,
                          SourceConfig sourceConfig,
                          Filter filter,
                          PenroseSearchResults results)
                   throws java.lang.Exception
Perform the search operation.

Throws:
java.lang.Exception

performLoad

public void performLoad(Partition partition,
                        SourceConfig sourceConfig,
                        Filter filter,
                        PenroseSearchResults results)
                 throws java.lang.Exception
Perform the load operation.

Throws:
java.lang.Exception

getConnectorConfig

public ConnectorConfig getConnectorConfig()

setConnectorConfig

public void setConnectorConfig(ConnectorConfig connectorConfig)

getConnectionManager

public ConnectionManager getConnectionManager()

setConnectionManager

public void setConnectionManager(ConnectionManager connectionManager)

getServerConfig

public PenroseConfig getServerConfig()

setPenroseConfig

public void setPenroseConfig(PenroseConfig penroseConfig)

getSourceCache

public SourceCache getSourceCache()

setSourceCache

public void setSourceCache(SourceCache sourceCache)

getThreadManager

public ThreadManager getThreadManager()

setThreadManager

public void setThreadManager(ThreadManager threadManager)