本文整理汇总了C#中NeoDatis.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.ToString方法的具体用法?C# NeoDatis.ToString怎么用?C# NeoDatis.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeoDatis
的用法示例。
在下文中一共展示了NeoDatis.ToString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ODBRuntimeException
public ODBRuntimeException(NeoDatis.Odb.Core.IError error, string message) : base
(string.Format("{0}\nVersion={1} , Build={2}, Date={3}, Thread={4}\nError:{5}\nStackTrace:{6}"
, message1, NeoDatis.Odb.Core.Release.ReleaseNumber, NeoDatis.Odb.Core.Release.ReleaseBuild
, NeoDatis.Odb.Core.Release.ReleaseDate, NeoDatis.Tool.Wrappers.OdbThread.GetCurrentThreadName
(), error.ToString(), message))
{
}
示例2: ValidateNode
public static void ValidateNode(NeoDatis.Btree.IBTreeNode node, bool isRoot)
{
if (!on)
{
return;
}
ValidateNode(node);
if (isRoot && node.HasParent())
{
throw new NeoDatis.Btree.Exception.BTreeNodeValidationException("Root node with a parent: "
+ node.ToString());
}
if (!isRoot && !node.HasParent())
{
throw new NeoDatis.Btree.Exception.BTreeNodeValidationException("Internal node without parent: "
+ node.ToString());
}
}
示例3: switch
//.........这里部分代码省略.........
return ManageDeleteObjectCommand((NeoDatis.Odb.Core.Server.Message.DeleteObjectMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.Close:
{
return ManageCloseCommand((NeoDatis.Odb.Core.Server.Message.CloseMessage)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.Commit:
{
return ManageCommitCommand((NeoDatis.Odb.Core.Server.Message.CommitMessage)message
);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.Rollback:
{
return ManageRollbackCommand((NeoDatis.Odb.Core.Server.Message.RollbackMessage)message
);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.DeleteBase:
{
return ManageDeleteBaseCommand((NeoDatis.Odb.Core.Server.Message.DeleteBaseMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.GetSessions:
{
return ManageGetSessionsCommand((NeoDatis.Odb.Core.Server.Message.GetSessionsMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.AddUniqueIndex:
{
return ManageAddIndexCommand((NeoDatis.Odb.Core.Server.Message.AddIndexMessage)message
);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.RebuildIndex:
{
return ManageRebuildIndexCommand((NeoDatis.Odb.Core.Server.Message.RebuildIndexMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.DeleteIndex:
{
return ManageDeleteIndexCommand((NeoDatis.Odb.Core.Server.Message.DeleteIndexMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.AddClassInfoList:
{
return ManageAddClassInfoListCommand((NeoDatis.Odb.Core.Server.Message.NewClassInfoListMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.Count:
{
return ManageCountCommand((NeoDatis.Odb.Core.Server.Message.CountMessage)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.GetObjectValues:
{
return ManageGetObjectValuesCommand((NeoDatis.Odb.Core.Server.Message.GetObjectValuesMessage
)message);
}
case NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command.CheckMetaModelCompatibility
:
{
return ManageCheckMetaModelCompatibilityCommand((NeoDatis.Odb.Core.Server.Message.CheckMetaModelCompatibilityMessage
)message);
}
default:
{
break;
break;
}
}
System.Text.StringBuilder buffer = new System.Text.StringBuilder();
buffer.Append("ODBServer.ConnectionThread:command ").Append(commandId).Append(" not implemented"
);
return new NeoDatis.Odb.Core.Server.Message.ErrorMessage("?", "?", buffer.ToString
());
}
finally
{
long end = NeoDatis.Tool.Wrappers.OdbTime.GetCurrentTimeInMs();
if (debug)
{
System.Text.StringBuilder buffer = new System.Text.StringBuilder();
buffer.Append("[").Append(nbMessages).Append("] ");
buffer.Append(message.ToString()).Append(" - Thread=").Append(GetName()).Append(" - connectionId ="
).Append(connectionId).Append(" - duration=").Append((end - start));
NeoDatis.Tool.DLogger.Info(buffer);
}
}
}
示例4: GetConnectionManager
private NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Message ManageGetObjectHeaderFromIdCommand
(NeoDatis.Odb.Core.Server.Message.GetObjectHeaderFromIdMessage message)
{
// Gets the base identifier
string baseIdentifier = message.GetBaseIdentifier();
// Gets the connection manager for this base identifier
NeoDatis.Odb.Core.Server.Connection.ConnectionManager connectionManager = null;
NeoDatis.Odb.Core.Server.Connection.IConnection connection = null;
NeoDatis.Odb.OID oid = null;
NeoDatis.Tool.Mutex.Mutex mutex = null;
try
{
mutex = NeoDatis.Tool.Mutex.MutexFactory.Get(baseIdentifier).Acquire(message.ToString
());
// Gets the connection manager for this base identifier
connectionManager = GetConnectionManager(baseIdentifier);
if (connectionManager == null)
{
System.Text.StringBuilder buffer = new System.Text.StringBuilder();
buffer.Append("ODBServer.ConnectionThread:Base ").Append(baseIdentifier).Append(" is not registered on this server!"
);
return new NeoDatis.Odb.Core.Server.Message.GetObjectHeaderFromIdMessageResponse(
baseIdentifier, message.GetConnectionId(), buffer.ToString());
}
connection = connectionManager.GetConnection(message.GetConnectionId());
connection.SetCurrentAction(NeoDatis.Odb.Core.Server.Connection.ConnectionAction.
ActionSelect);
NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine engine = connection.GetStorageEngine
();
oid = message.GetOid();
NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectInfoHeader oih = engine.GetObjectInfoHeaderFromOid
(oid);
// the oih.duplicate method is called to create a new instance of the ObjectInfoHeader becasue of
// the java Serialization problem : Serialization will check the reference of the object and only send the reference if the object has already
// been changed. => creating a new will avoid this problem
return new NeoDatis.Odb.Core.Server.Message.GetObjectHeaderFromIdMessageResponse(
baseIdentifier, message.GetConnectionId(), oih.Duplicate());
}
catch (System.Exception e)
{
string se = NeoDatis.Tool.Wrappers.OdbString.ExceptionToString(e, false);
string msg = baseIdentifier + ":Error while getting object of id " + oid;
NeoDatis.Tool.DLogger.Error(msg, e);
return new NeoDatis.Odb.Core.Server.Message.GetObjectHeaderFromIdMessageResponse(
baseIdentifier, message.GetConnectionId(), msg + ":\n" + se);
}
finally
{
if (mutex != null)
{
mutex.Release("getObjectFromId");
}
connection.EndCurrentAction();
}
}
示例5: CheckValuesOfChild
private static void CheckValuesOfChild(NeoDatis.Btree.IKeyAndValue key, NeoDatis.Btree.IBTreeNode
node)
{
if (!on)
{
return;
}
if (node == null)
{
return;
}
for (int i = 0; i < node.GetNbKeys(); i++)
{
if (node.GetKeyAndValueAt(i).GetKey().CompareTo(key.GetKey()) >= 0)
{
throw new NeoDatis.Btree.Exception.BTreeNodeValidationException("Left child with values bigger than pivot "
+ key + " : " + node.ToString());
}
}
}
示例6: WriteNonNativeObjectInfo
public virtual NeoDatis.Odb.OID WriteNonNativeObjectInfo(NeoDatis.Odb.OID existingOid
, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo objectInfo, long position
, bool writeDataInTransaction, bool isNewObject)
{
NeoDatis.Odb.Core.Transaction.ISession lsession = GetSession();
NeoDatis.Odb.Core.Transaction.ICache cache = lsession.GetCache();
bool hasObject = objectInfo.GetObject() != null;
// Insert triggers for CS Mode, local mode insert triggers are called in the DefaultInstrumentationCallbackForStore class
if (isNewObject && !isLocalMode)
{
triggerManager.ManageInsertTriggerBefore(objectInfo.GetClassInfo().GetFullClassName
(), objectInfo);
}
// Checks if object is null,for null objects,there is nothing to do
if (objectInfo.IsNull())
{
return NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant.NullObjectId;
}
NeoDatis.Odb.Core.Layers.Layer2.Meta.MetaModel metaModel = lsession.GetMetaModel(
);
// first checks if the class of this object already exist in the
// metamodel
if (!metaModel.ExistClass(objectInfo.GetClassInfo().GetFullClassName()))
{
AddClass(objectInfo.GetClassInfo(), true);
}
// if position is -1, gets the position where to write the object
if (position == -1)
{
// Write at the end of the file
position = fsi.GetAvailablePosition();
// Updates the meta object position
objectInfo.SetPosition(position);
}
// Gets the object id
NeoDatis.Odb.OID oid = existingOid;
if (oid == null)
{
// If, to get the next id, a new id block must be created, then
// there is an extra work
// to update the current object position
if (idManager.MustShift())
{
oid = idManager.GetNextObjectId(position);
// The id manager wrote in the file so the position for the
// object must be re-computed
position = fsi.GetAvailablePosition();
// The oid must be associated to this new position - id
// operations are always out of transaction
// in this case, the update is done out of the transaction as a
// rollback won t need to
// undo this. We are just creating the id
// => third parameter(write in transaction) = false
idManager.UpdateObjectPositionForOid(oid, position, false);
}
else
{
oid = idManager.GetNextObjectId(position);
}
}
else
{
// If an oid was passed, it is because object already exist and
// is being updated. So we
// must update the object position
// Here the update of the position of the id must be done in
// transaction as the object
// position of the id is being updated, and a rollback should undo
// this
// => third parameter(write in transaction) = true
idManager.UpdateObjectPositionForOid(oid, position, true);
// Keep the relation of id and position in the cache until the
// commit
cache.SavePositionOfObjectWithOid(oid, position);
}
// Sets the oid of the object in the inserting cache
cache.UpdateIdOfInsertingObject(objectInfo.GetObject(), oid);
// Only add the oid to unconnected zone if it is a new object
if (isNewObject)
{
cache.AddOIDToUnconnectedZone(oid);
if (NeoDatis.Odb.OdbConfiguration.ReconnectObjectsToSession())
{
NeoDatis.Odb.Core.Transaction.ICrossSessionCache crossSessionCache = NeoDatis.Odb.Impl.Core.Transaction.CacheFactory
.GetCrossSessionCache(storageEngine.GetBaseIdentification().GetIdentification());
crossSessionCache.AddObject(objectInfo.GetObject(), oid);
}
}
objectInfo.SetOid(oid);
if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
{
NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Start Writing non native object of type "
+ objectInfo.GetClassInfo().GetFullClassName() + " at " + position + " , oid = "
+ oid + " : " + objectInfo.ToString());
}
if (objectInfo.GetClassInfo() == null || objectInfo.GetClassInfo().GetId() == null)
{
if (objectInfo.GetClassInfo() != null)
{
NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo clinfo = storageEngine.GetSession(
//.........这里部分代码省略.........
示例7: WriteNativeObjectInfo
/// <summary>Actually write the object data to the database file</summary>
/// <param name="oidOfObjectToQuery">The object id, can be -1 (not set)</param>
/// <param name="aoi">The object meta infor The object info to be written</param>
/// <param name="position">if -1, it is a new instance, if not, it is an update</param>
/// <param name="updatePointers"></param>
/// <returns>The object posiiton or id(if <0)</returns>
/// <exception cref="System.Exception">System.Exception</exception>
/// <>
/// * public OID writeObjectInfo(OID oid, AbstractObjectInfo
/// aoi, long position, boolean updatePointers) throws Exception
/// { currentDepth++;
/// try {
/// if (aoi.isNative()) { return
/// writeNativeObjectInfo((NativeObjectInfo) aoi, position,
/// updatePointers, false); }
/// return writeNonNativeObjectInfo(oid, aoi, position,
/// updatePointers, false); } finally { currentDepth--; } }
/// </>
private long WriteNativeObjectInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo
noi, long position, bool updatePointers, bool writeInTransaction)
{
if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogIdDebug))
{
NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Writing native object at " + position
+ " : Type=" + NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType.GetNameFromId(noi.GetOdbTypeId
()) + " | Value=" + noi.ToString());
}
if (noi.IsAtomicNativeObject())
{
return WriteAtomicNativeObject((NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
)noi, writeInTransaction);
}
if (noi.IsNull())
{
WriteNullNativeObjectHeader(noi.GetOdbTypeId(), writeInTransaction);
return position;
}
if (noi.IsCollectionObject())
{
return WriteCollection((NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo
)noi, writeInTransaction);
}
if (noi.IsMapObject())
{
return WriteMap((NeoDatis.Odb.Core.Layers.Layer2.Meta.MapObjectInfo)noi, writeInTransaction
);
}
if (noi.IsArrayObject())
{
return WriteArray((NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo)noi, writeInTransaction
);
}
if (noi.IsEnumObject())
{
return WriteEnumNativeObject((NeoDatis.Odb.Core.Layers.Layer2.Meta.EnumNativeObjectInfo
)noi, writeInTransaction);
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.NativeTypeNotSupported
.AddParameter(noi.GetOdbTypeId()));
}
示例8: WriteClassInfoBody
/// <summary>Write the class info body to the database file.</summary>
/// <remarks>
/// Write the class info body to the database file. TODO Check if we really
/// must recall the writeClassInfoHeader
/// </remarks>
/// <param name="classInfo"></param>
/// <param name="position">The position</param>
/// <param name="writeInTransaction"></param>
/// <></>
public virtual void WriteClassInfoBody(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
classInfo, long position, bool writeInTransaction)
{
if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
{
NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Writing new Class info body at " +
position + " : " + classInfo.ToString());
}
// updates class info
classInfo.SetAttributesDefinitionPosition(position);
// FIXME : change this to write only the position and not the whole
// header
WriteClassInfoHeader(classInfo, classInfo.GetPosition(), writeInTransaction);
fsi.SetWritePosition(position, writeInTransaction);
// block definition
fsi.WriteInt(0, writeInTransaction, "block size");
fsi.WriteByte(NeoDatis.Odb.Impl.Core.Layers.Layer3.Block.BlockTypes.BlockTypeClassBody
, writeInTransaction);
// number of attributes
fsi.WriteLong(classInfo.GetAttributes().Count, writeInTransaction, "class nb attributes"
, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassAttributeInfo cai = null;
for (int i = 0; i < classInfo.GetAttributes().Count; i++)
{
cai = classInfo.GetAttributes()[i];
WriteClassAttributeInfo(cai, writeInTransaction);
}
int blockSize = (int)(fsi.GetPosition() - position);
WriteBlockSizeAt(position, blockSize, writeInTransaction, classInfo);
}
示例9: WriteClassInfoHeader
public virtual void WriteClassInfoHeader(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
classInfo, long position, bool writeInTransaction)
{
NeoDatis.Odb.OID classId = classInfo.GetId();
if (classId == null)
{
classId = idManager.GetNextClassId(position);
classInfo.SetId(classId);
}
else
{
idManager.UpdateClassPositionForId(classId, position, true);
}
fsi.SetWritePosition(position, writeInTransaction);
if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
{
NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Writing new Class info header at "
+ position + " : " + classInfo.ToString());
}
// Real value of block size is only known at the end of the writing
fsi.WriteInt(0, writeInTransaction, "block size");
fsi.WriteByte(NeoDatis.Odb.Impl.Core.Layers.Layer3.Block.BlockTypes.BlockTypeClassHeader
, writeInTransaction, "class header block type");
fsi.WriteByte(classInfo.GetClassCategory(), writeInTransaction, "Class info category"
);
fsi.WriteLong(classId.GetObjectId(), writeInTransaction, "class id", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
.DataWriteAction);
WriteOid(classInfo.GetPreviousClassOID(), writeInTransaction, "prev class oid", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
.DataWriteAction);
WriteOid(classInfo.GetNextClassOID(), writeInTransaction, "next class oid", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
.DataWriteAction);
fsi.WriteLong(classInfo.GetCommitedZoneInfo().GetNbObjects(), writeInTransaction,
"class nb objects", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction
);
WriteOid(classInfo.GetCommitedZoneInfo().first, writeInTransaction, "class first obj pos"
, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
WriteOid(classInfo.GetCommitedZoneInfo().last, writeInTransaction, "class last obj pos"
, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
// FIXME : append extra info if not empty (.net compatibility)
fsi.WriteString(classInfo.GetFullClassName(), false, writeInTransaction);
fsi.WriteInt(classInfo.GetMaxAttributeId(), writeInTransaction, "Max attribute id"
);
if (classInfo.GetAttributesDefinitionPosition() != -1)
{
fsi.WriteLong(classInfo.GetAttributesDefinitionPosition(), writeInTransaction, "class att def pos"
, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
}
else
{
// @todo check this
fsi.WriteLong(-1, writeInTransaction, "class att def pos", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
.DataWriteAction);
}
int blockSize = (int)(fsi.GetPosition() - position);
WriteBlockSizeAt(position, blockSize, writeInTransaction, classInfo);
}
示例10: UpdateNonNativeObjectInfo
/// <summary>Updates an object.</summary>
/// <remarks>
/// Updates an object.
/// <pre>
/// Try to update in place. Only change what has changed. This is restricted to particular types (fixed size types). If in place update is
/// not possible, then deletes the current object and creates a new at the end of the database file and updates
/// OID object position.
/// @param object The object to be updated
/// @param forceUpdate when true, no verification is done to check if update must be done.
/// @return The oid of the object, as a negative number
/// @
/// </remarks>
public virtual NeoDatis.Odb.OID UpdateNonNativeObjectInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
nnoi, bool forceUpdate)
{
nbCallsToUpdate++;
bool hasObject = true;
string message = null;
object @object = nnoi.GetObject();
NeoDatis.Odb.OID oid = nnoi.GetOid();
if (@object == null)
{
hasObject = false;
}
// When there is index,we must *always* load the old meta representation
// to compute index keys
bool withIndex = !nnoi.GetClassInfo().GetIndexes().IsEmpty();
NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo oldMetaRepresentation =
null;
// Used to check consistency, at the end, the number of
// nbConnectedObjects must and nbUnconnected must remain unchanged
long nbConnectedObjects = nnoi.GetClassInfo().GetCommitedZoneInfo().GetNbObjects(
);
long nbNonConnectedObjects = nnoi.GetClassInfo().GetUncommittedZoneInfo().GetNbObjects
();
bool objectHasChanged = false;
try
{
NeoDatis.Odb.Core.Transaction.ISession lsession = GetSession();
long positionBeforeWrite = fsi.GetPosition();
NeoDatis.Odb.Core.Transaction.ITmpCache tmpCache = lsession.GetTmpCache();
NeoDatis.Odb.Core.Transaction.ICache cache = lsession.GetCache();
// Get header of the object (position, previous object position,
// next
// object position and class info position)
// The header must be in the cache.
NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectInfoHeader lastHeader = cache.GetObjectInfoHeaderFromOid
(oid, true);
if (lastHeader == null)
{
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.UnexpectedSituation
.AddParameter("Header is null in update"));
}
if (lastHeader.GetOid() == null)
{
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.InternalError
.AddParameter("Header oid is null for oid " + oid));
}
bool objectIsInConnectedZone = cache.ObjectWithIdIsInCommitedZone(oid);
long currentPosition = lastHeader.GetPosition();
// When using client server mode, we must re-read the position of
// the object with oid. Because, another session may
// have updated the object, and in this case, the position of the
// object in the cache may be invalid
// TODO It should be done only when the object has been deleted or
// updated by another session. Should check this
// Doing this with new objects (created in the current session, the
// last committed
// object position will be negative, in this case we must use the
// currentPosition
if (!isLocalMode)
{
long lastCommitedObjectPosition = idManager.GetObjectPositionWithOid(oid, false);
if (lastCommitedObjectPosition > 0)
{
currentPosition = lastCommitedObjectPosition;
}
// Some infos that come from the client are not set
// So we overwrite them here : example : object version. Update
// date is not important here
// Because, as we are updating the object, the update date will
// be updated too
nnoi.GetHeader().SetObjectVersion(lastHeader.GetObjectVersion());
nnoi.GetHeader().SetUpdateDate(lastHeader.GetUpdateDate());
}
// for client server
if (nnoi.GetPosition() == -1)
{
nnoi.GetHeader().SetPosition(currentPosition);
}
if (currentPosition == -1)
{
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.InstancePositionIsNegative
.AddParameter(currentPosition).AddParameter(oid).AddParameter("In Object Info Header"
));
}
if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
{
message = DepthToSpaces() + "start updating object at " + currentPosition + ", oid="
+ oid + " : " + (nnoi != null ? nnoi.ToString() : "null");
//.........这里部分代码省略.........
示例11: GetIO
/// <summary>
/// TODO Return a list of IO to enable replication or other IO mechanism Used
/// by the FileSystemInterface to actual write/read byte to underlying
/// storage
/// </summary>
/// <param name="name">The name of the buffered io</param>
/// <param name="parameters">The parameters that define the buffer</param>
/// <param name="bufferSize">The size of the buffers</param>
/// <returns>The buffer implementation @</returns>
public virtual NeoDatis.Odb.Core.Layers.Layer3.IBufferedIO GetIO(string name, NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification
parameters, int bufferSize)
{
if (parameters is NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter)
{
NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter fileParameters = (NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter
)parameters;
// Guarantee that file directory structure exist
NeoDatis.Tool.Wrappers.IO.OdbFile f = new NeoDatis.Tool.Wrappers.IO.OdbFile(fileParameters
.GetFileName());
NeoDatis.Tool.Wrappers.IO.OdbFile fparent = f.GetParentFile();
if (fparent != null && !fparent.Exists())
{
fparent.Mkdirs();
}
return new NeoDatis.Odb.Impl.Core.Layers.Layer3.Buffer.MultiBufferedFileIO(NeoDatis.Odb.OdbConfiguration
.GetNbBuffers(), name, fileParameters.GetFileName(), fileParameters.CanWrite(),
bufferSize);
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.UnsupportedIoType
.AddParameter(parameters.ToString()));
}