You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2007/01/19 02:01:32 UTC
svn commit: r497667 - in
/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless: ./
EmptyDictionary.java NoOpTransaction.java StorelessDatabase.java
StorelessService.java
Author: djd
Date: Thu Jan 18 17:01:28 2007
New Revision: 497667
URL: http://svn.apache.org/viewvc?view=rev&rev=497667
Log:
DERBY-2164 (partial) Add the actual storeless implementation files that I thought had
been added under revision 497593 (they were marked as A but did not get added
into the commit for some reason).
Added:
db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/
db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java (with props)
db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java (with props)
db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessDatabase.java (with props)
db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessService.java (with props)
Added: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java?view=auto&rev=497667
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java (added)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java Thu Jan 18 17:01:28 2007
@@ -0,0 +1,723 @@
+/*
+
+ Derby - Class org.apache.impl.storeless.EmptyDictionary
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.derby.impl.storeless;
+
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.derby.catalog.UUID;
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.reference.EngineType;
+import org.apache.derby.iapi.services.monitor.ModuleSupportable;
+import org.apache.derby.iapi.services.monitor.Monitor;
+import org.apache.derby.iapi.services.uuid.UUIDFactory;
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
+import org.apache.derby.iapi.sql.depend.DependencyManager;
+import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ColPermsDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ConstraintDescriptorList;
+import org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator;
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;
+import org.apache.derby.iapi.sql.dictionary.DependencyDescriptor;
+import org.apache.derby.iapi.sql.dictionary.FileInfoDescriptor;
+import org.apache.derby.iapi.sql.dictionary.GenericDescriptorList;
+import org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor;
+import org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor;
+import org.apache.derby.iapi.sql.dictionary.SPSDescriptor;
+import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
+import org.apache.derby.iapi.sql.dictionary.SubKeyConstraintDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TablePermsDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TriggerDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ViewDescriptor;
+import org.apache.derby.iapi.sql.execute.ExecutionFactory;
+import org.apache.derby.iapi.store.access.TransactionController;
+import org.apache.derby.iapi.types.DataTypeDescriptor;
+import org.apache.derby.iapi.types.DataValueFactory;
+import org.apache.derby.iapi.types.NumberDataValue;
+import org.apache.derby.iapi.types.RowLocation;
+
+/**
+ * DataDictionary implementation that does nothing!
+ * Used for the storeless system.
+ * @author djd
+ *
+ */
+public class EmptyDictionary implements DataDictionary, ModuleSupportable {
+
+ public void clearCaches() throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int startReading(LanguageConnectionContext lcc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void doneReading(int mode, LanguageConnectionContext lcc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void startWriting(LanguageConnectionContext lcc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void transactionFinished() throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ExecutionFactory getExecutionFactory() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataValueFactory getDataValueFactory() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataDescriptorGenerator getDataDescriptorGenerator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getAuthorizationDatabaseOwner() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean usesSqlAuthorization() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public SchemaDescriptor getSchemaDescriptor(String schemaName,
+ TransactionController tc, boolean raiseError)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SchemaDescriptor getSchemaDescriptor(UUID schemaId,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SchemaDescriptor getSystemSchemaDescriptor()
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SchemaDescriptor getSysIBMSchemaDescriptor()
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor()
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isSystemSchemaName(String name) throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void dropSchemaDescriptor(String schemaName, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean isSchemaEmpty(SchemaDescriptor sd) throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public TableDescriptor getTableDescriptor(String tableName,
+ SchemaDescriptor schema) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TableDescriptor getTableDescriptor(UUID tableID)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropTableDescriptor(TableDescriptor td,
+ SchemaDescriptor schema, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateLockGranularity(TableDescriptor td,
+ SchemaDescriptor schema, char lockGranularity,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ColumnDescriptor getColumnDescriptorByDefaultId(UUID uuid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropColumnDescriptor(UUID tableID, String columnName,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropAllColumnDescriptors(UUID tableID, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropAllTableAndColPermDescriptors(UUID tableID,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateSYSCOLPERMSforAddColumnToUserTable(UUID tableID,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropAllRoutinePermDescriptors(UUID routineID,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ViewDescriptor getViewDescriptor(UUID uuid) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ViewDescriptor getViewDescriptor(TableDescriptor td)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropViewDescriptor(ViewDescriptor viewDescriptor,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ConstraintDescriptor getConstraintDescriptor(UUID uuid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConstraintDescriptor getConstraintDescriptor(String constraintName,
+ UUID schemaID) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConstraintDescriptorList getActiveConstraintDescriptors(
+ ConstraintDescriptorList cdl) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean activeConstraint(ConstraintDescriptor constraint)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public ConstraintDescriptor getConstraintDescriptor(TableDescriptor td,
+ UUID uuid) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConstraintDescriptor getConstraintDescriptorById(TableDescriptor td,
+ UUID uuid) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConstraintDescriptor getConstraintDescriptorByName(
+ TableDescriptor td, SchemaDescriptor sd, String constraintName,
+ boolean forUpdate) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TableDescriptor getConstraintTableDescriptor(UUID constraintId)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConstraintDescriptorList getForeignKeys(UUID constraintId)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void addConstraintDescriptor(ConstraintDescriptor descriptor,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropConstraintDescriptor(TableDescriptor table,
+ ConstraintDescriptor descriptor, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropAllConstraintDescriptors(TableDescriptor table,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateConstraintDescriptor(ConstraintDescriptor cd,
+ UUID formerUUID, int[] colsToSet, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public SubKeyConstraintDescriptor getSubKeyConstraint(UUID constraintId,
+ int type) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SPSDescriptor getSPSDescriptor(UUID uuid) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SPSDescriptor getSPSDescriptor(String name, SchemaDescriptor sd)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getAllSPSDescriptors() throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, Vector defaults)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void addSPSDescriptor(SPSDescriptor descriptor,
+ TransactionController tc, boolean wait) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateSPS(SPSDescriptor spsd, TransactionController tc,
+ boolean recompile, boolean updateSYSCOLUMNS, boolean wait,
+ boolean firstCompilation) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropSPSDescriptor(SPSDescriptor descriptor,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropSPSDescriptor(UUID uuid, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void invalidateAllSPSPlans() throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public TriggerDescriptor getTriggerDescriptor(UUID uuid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TriggerDescriptor getTriggerDescriptor(String name,
+ SchemaDescriptor sd) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public GenericDescriptorList getTriggerDescriptors(TableDescriptor td)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void updateTriggerDescriptor(TriggerDescriptor triggerd,
+ UUID formerUUID, int[] colsToSet, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropTriggerDescriptor(TriggerDescriptor descriptor,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Hashtable hashAllConglomerateDescriptorsByNumber(
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Hashtable hashAllTableDescriptorsByTableId(TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateDescriptor getConglomerateDescriptor(UUID uuid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateDescriptor[] getConglomerateDescriptors(UUID uuid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateDescriptor getConglomerateDescriptor(
+ long conglomerateNumber) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateDescriptor[] getConglomerateDescriptors(
+ long conglomerateNumber) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateDescriptor getConglomerateDescriptor(String indexName,
+ SchemaDescriptor sd, boolean forUpdate) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropConglomerateDescriptor(ConglomerateDescriptor conglomerate,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropAllConglomerateDescriptors(TableDescriptor td,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateConglomerateDescriptor(ConglomerateDescriptor[] cds,
+ long conglomerateNumber, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void updateConglomerateDescriptor(ConglomerateDescriptor cd,
+ long conglomerateNumber, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public List getDependentsDescriptorList(String dependentID)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getProvidersDescriptorList(String providerID)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getAllDependencyDescriptorsList() throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropStoredDependency(DependencyDescriptor dd,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropDependentsStoredDependencies(UUID dependentsUUID,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public UUIDFactory getUUIDFactory() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public AliasDescriptor getAliasDescriptor(UUID uuid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public AliasDescriptor getAliasDescriptor(String schemaID,
+ String aliasName, char nameSpace) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getRoutineList(String schemaID, String routineName,
+ char nameSpace) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropAliasDescriptor(AliasDescriptor ad, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int getEngineType() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public FileInfoDescriptor getFileInfoDescriptor(UUID id)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd,
+ String name) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropFileInfoDescriptor(FileInfoDescriptor fid)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public RowLocation[] computeAutoincRowLocations(TransactionController tc,
+ TableDescriptor td) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RowLocation getRowLocationTemplate(LanguageConnectionContext lcc,
+ TableDescriptor td) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NumberDataValue getSetAutoincrementValue(RowLocation rl,
+ TransactionController tc, boolean doUpdate,
+ NumberDataValue newValue, boolean wait) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setAutoincrementValue(TransactionController tc, UUID tableUUID,
+ String columnName, long aiValue, boolean incrementNeeded)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public List getStatisticsDescriptors(TableDescriptor td)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void dropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public DependencyManager getDependencyManager() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getCacheMode() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getSystemSQLName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void addDescriptor(TupleDescriptor tuple, TupleDescriptor parent,
+ int catalogNumber, boolean allowsDuplicates,
+ TransactionController tc) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addDescriptorArray(TupleDescriptor[] tuple,
+ TupleDescriptor parent, int catalogNumber,
+ boolean allowsDuplicates, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean checkVersion(int majorVersion, String feature)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean addRemovePermissionsDescriptor(boolean add,
+ PermissionsDescriptor perm, String grantee, TransactionController tc)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public TablePermsDescriptor getTablePermissions(UUID tableUUID,
+ String authorizationId) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TablePermsDescriptor getTablePermissions(UUID tablePermsUUID)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ColPermsDescriptor getColumnPermissions(UUID tableUUID,
+ int privType, boolean forGrant, String authorizationId)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ColPermsDescriptor getColumnPermissions(UUID tableUUID,
+ String privTypeStr, boolean forGrant, String authorizationId)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ColPermsDescriptor getColumnPermissions(UUID colPermsUUID)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RoutinePermsDescriptor getRoutinePermissions(UUID routineUUID,
+ String authorizationId) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RoutinePermsDescriptor getRoutinePermissions(UUID routinePermsUUID)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void addDescriptor(TupleDescriptor tuple, TupleDescriptor parent,
+ int catalogNumber, boolean allowsDuplicates,
+ TransactionController tc, boolean wait) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropDependentsStoredDependencies(UUID dependentsUUID,
+ TransactionController tc, boolean wait) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean canSupport(Properties properties) {
+ return Monitor.isDesiredType(properties,
+ EngineType.STORELESS_ENGINE);
+ }
+
+ public String getVTIClass(TableDescriptor td, boolean asTableFunction) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Propchange: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java?view=auto&rev=497667
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java (added)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java Thu Jan 18 17:01:28 2007
@@ -0,0 +1,414 @@
+/*
+
+ Derby - Class org.apache.impl.storeless.NoOpTransaction
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.derby.impl.storeless;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.services.context.ContextManager;
+import org.apache.derby.iapi.services.io.FormatableBitSet;
+import org.apache.derby.iapi.services.io.Storable;
+import org.apache.derby.iapi.store.access.AccessFactory;
+import org.apache.derby.iapi.store.access.BackingStoreHashtable;
+import org.apache.derby.iapi.store.access.ColumnOrdering;
+import org.apache.derby.iapi.store.access.ConglomerateController;
+import org.apache.derby.iapi.store.access.DatabaseInstant;
+import org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo;
+import org.apache.derby.iapi.store.access.FileResource;
+import org.apache.derby.iapi.store.access.GroupFetchScanController;
+import org.apache.derby.iapi.store.access.Qualifier;
+import org.apache.derby.iapi.store.access.RowLocationRetRowSource;
+import org.apache.derby.iapi.store.access.ScanController;
+import org.apache.derby.iapi.store.access.SortController;
+import org.apache.derby.iapi.store.access.SortCostController;
+import org.apache.derby.iapi.store.access.SortObserver;
+import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo;
+import org.apache.derby.iapi.store.access.StoreCostController;
+import org.apache.derby.iapi.store.access.TransactionController;
+import org.apache.derby.iapi.store.raw.Loggable;
+import org.apache.derby.iapi.types.DataValueDescriptor;
+
+/**
+ * A TransactionController that does nothing.
+ * This allows the existing transaction aware language
+ * code to remain unchanged while not supporting transactions
+ * for the storeless engine.
+ */
+class NoOpTransaction implements TransactionController {
+
+ public AccessFactory getAccessManager() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean conglomerateExists(long conglomId) throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public long createConglomerate(String implementation,
+ DataValueDescriptor[] template, ColumnOrdering[] columnOrder,
+ Properties properties, int temporaryFlag) throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long createAndLoadConglomerate(String implementation,
+ DataValueDescriptor[] template, ColumnOrdering[] columnOrder,
+ Properties properties, int temporaryFlag,
+ RowLocationRetRowSource rowSource, long[] rowCount)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long recreateAndLoadConglomerate(String implementation,
+ boolean recreate_ifempty, DataValueDescriptor[] template,
+ ColumnOrdering[] columnOrder, Properties properties,
+ int temporaryFlag, long orig_conglomId,
+ RowLocationRetRowSource rowSource, long[] rowCount)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void addColumnToConglomerate(long conglomId, int column_id,
+ Storable template_column) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dropConglomerate(long conglomId) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public long findConglomid(long containerid) throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long findContainerid(long conglomid) throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public TransactionController startNestedUserTransaction(boolean readOnly)
+ throws StandardException {
+ return this;
+ }
+
+ public Properties getUserCreateConglomPropList() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateController openConglomerate(long conglomId,
+ boolean hold, int open_mode, int lock_level, int isolation_level)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConglomerateController openCompiledConglomerate(boolean hold,
+ int open_mode, int lock_level, int isolation_level,
+ StaticCompiledOpenConglomInfo static_info,
+ DynamicCompiledOpenConglomInfo dynamic_info)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public BackingStoreHashtable createBackingStoreHashtableFromScan(
+ long conglomId, int open_mode, int lock_level, int isolation_level,
+ FormatableBitSet scanColumnList,
+ DataValueDescriptor[] startKeyValue, int startSearchOperator,
+ Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue,
+ int stopSearchOperator, long max_rowcnt, int[] key_column_numbers,
+ boolean remove_duplicates, long estimated_rowcnt,
+ long max_inmemory_rowcnt, int initialCapacity, float loadFactor,
+ boolean collect_runtimestats, boolean skipNullKeyColumns)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ScanController openScan(long conglomId, boolean hold, int open_mode,
+ int lock_level, int isolation_level,
+ FormatableBitSet scanColumnList,
+ DataValueDescriptor[] startKeyValue, int startSearchOperator,
+ Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue,
+ int stopSearchOperator) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ScanController openCompiledScan(boolean hold, int open_mode,
+ int lock_level, int isolation_level,
+ FormatableBitSet scanColumnList,
+ DataValueDescriptor[] startKeyValue, int startSearchOperator,
+ Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue,
+ int stopSearchOperator, StaticCompiledOpenConglomInfo static_info,
+ DynamicCompiledOpenConglomInfo dynamic_info)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public GroupFetchScanController openGroupFetchScan(long conglomId,
+ boolean hold, int open_mode, int lock_level, int isolation_level,
+ FormatableBitSet scanColumnList,
+ DataValueDescriptor[] startKeyValue, int startSearchOperator,
+ Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue,
+ int stopSearchOperator) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public GroupFetchScanController defragmentConglomerate(long conglomId,
+ boolean online, boolean hold, int open_mode, int lock_level,
+ int isolation_level) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void purgeConglomerate(long conglomId) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void compressConglomerate(long conglomId) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean fetchMaxOnBtree(long conglomId, int open_mode,
+ int lock_level, int isolation_level,
+ FormatableBitSet scanColumnList, DataValueDescriptor[] fetchRow)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public StoreCostController openStoreCost(long conglomId)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int countOpens(int which_to_count) throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String debugOpened() throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public FileResource getFileHandler() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getLockObject() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo(
+ long conglomId) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo(
+ long conglomId) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long[] getCacheStats(String cacheName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void resetCacheStats(String cacheName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void logAndDo(Loggable operation) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public long createSort(Properties implParameters,
+ DataValueDescriptor[] template, ColumnOrdering[] columnOrdering,
+ SortObserver sortObserver, boolean alreadyInOrder,
+ long estimatedRows, int estimatedRowSize) throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void dropSort(long sortid) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public SortController openSort(long id) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SortCostController openSortCostController(Properties implParameters)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public RowLocationRetRowSource openSortRowSource(long id)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ScanController openSortScan(long id, boolean hold)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean anyoneBlocked() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void abort() throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void commit() throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public DatabaseInstant commitNoSync(int commitflag)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void destroy() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ContextManager getContextManager() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTransactionIdString() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getActiveStateTxIdString() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isIdle() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isGlobal() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isPristine() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public int releaseSavePoint(String name, Object kindOfSavepoint)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int rollbackToSavePoint(String name, boolean close_controllers,
+ Object kindOfSavepoint) throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int setSavePoint(String name, Object kindOfSavepoint)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Object createXATransactionFromLocalTransaction(int format_id,
+ byte[] global_id, byte[] branch_id) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Serializable getProperty(String key) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Serializable getPropertyDefault(String key) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean propertyDefaultIsVisible(String key)
+ throws StandardException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setProperty(String key, Serializable value,
+ boolean dbOnlyProperty) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPropertyDefault(String key, Serializable value)
+ throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Properties getProperties() throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Propchange: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessDatabase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessDatabase.java?view=auto&rev=497667
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessDatabase.java (added)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessDatabase.java Thu Jan 18 17:01:28 2007
@@ -0,0 +1,80 @@
+/*
+
+ Derby - Class org.apache.impl.storeless.StorelessDatabase
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.derby.impl.storeless;
+
+import java.util.Properties;
+
+import org.apache.derby.catalog.UUID;
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.reference.EngineType;
+import org.apache.derby.iapi.services.context.ContextManager;
+import org.apache.derby.iapi.services.monitor.Monitor;
+import org.apache.derby.iapi.store.access.TransactionController;
+import org.apache.derby.impl.db.BasicDatabase;
+
+/**
+ * Database implementation that drives the storeless engine
+ * as a Database service with no store.
+ *
+ */
+public class StorelessDatabase extends BasicDatabase {
+
+ public StorelessDatabase() {
+ }
+
+ public int getEngineType() {
+ return EngineType.STORELESS_ENGINE;
+ }
+
+ /**
+ * The key, don't boot a store!
+ */
+ protected void bootStore(boolean create, Properties startParams)
+ {
+ }
+
+ protected void createFinished()
+ {
+
+ }
+
+ protected UUID makeDatabaseID(boolean create, Properties startParams)
+ {
+ return Monitor.getMonitor().getUUIDFactory().createUUID();
+ }
+
+ protected Properties getAllDatabaseProperties()
+ throws StandardException
+ {
+ return new Properties();
+ }
+
+ protected TransactionController getConnectionTransaction(ContextManager cm)
+ throws StandardException {
+
+ // start a local transaction
+ return new NoOpTransaction();
+ }
+ public boolean isReadOnly()
+ {
+ return true;
+ }
+}
Propchange: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessDatabase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessService.java?view=auto&rev=497667
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessService.java (added)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessService.java Thu Jan 18 17:01:28 2007
@@ -0,0 +1,110 @@
+/*
+
+ Derby - Class org.apache.impl.storeless.StorelessService
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+package org.apache.derby.impl.storeless;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.reference.EngineType;
+import org.apache.derby.iapi.reference.Property;
+import org.apache.derby.iapi.services.monitor.PersistentService;
+import org.apache.derby.io.StorageFactory;
+
+/**
+ * PersistentService for the storeless engine.
+ * Type is 'storeless' which will correspond to
+ * the JDBC URL 'jdbc:derby:storeless'.
+ *
+ */
+public class StorelessService implements PersistentService {
+
+ public StorelessService()
+ {
+ }
+
+ public String getType() {
+ return "storeless";
+ }
+
+ public Enumeration getBootTimeServices() {
+ return null;
+ }
+
+ public Properties getServiceProperties(String serviceName, Properties defaultProperties) throws StandardException {
+
+ Properties service = new Properties(defaultProperties);
+ service.setProperty(Property.SERVICE_PROTOCOL,
+ "org.apache.derby.database.Database");
+ service.setProperty(EngineType.PROPERTY,
+ Integer.toString(getEngineType()));
+ return service;
+ }
+
+ public void saveServiceProperties(String serviceName, StorageFactory storageFactory, Properties properties, boolean replace) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void saveServiceProperties(String serviceName, Properties properties, boolean replace) throws StandardException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String createServiceRoot(String name, boolean deleteExisting) throws StandardException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean removeServiceRoot(String serviceName) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public String getCanonicalServiceName(String name) {
+ return name;
+ }
+
+ public String getUserServiceName(String serviceName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isSameService(String serviceName1, String serviceName2) {
+ // TODO Auto-generated method stub
+ return serviceName1.equals(serviceName2);
+ }
+
+ public boolean hasStorageFactory() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public StorageFactory getStorageFactoryInstance(boolean useHome, String databaseName, String tempDirName, String uniqueName) throws StandardException, IOException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ protected int getEngineType() {
+ return EngineType.STORELESS_ENGINE;
+ }
+}
Propchange: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/StorelessService.java
------------------------------------------------------------------------------
svn:eol-style = native