Beispiel #1
0
 public FileSystemInterface(string name, NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification
                            parameters, bool canLog, int bufferSize)
 {
     this.name       = name;
     this.parameters = parameters;
     this.canLog     = canLog;
     NeoDatis.Odb.Core.ICoreProvider provider = NeoDatis.Odb.OdbConfiguration.GetCoreProvider
                                                    ();
     this.io = provider.GetIO(name, parameters, bufferSize);
     this.byteArrayConverter = provider.GetByteArrayConverter();
 }
Beispiel #2
0
 public virtual void Init(NeoDatis.Odb.Core.Transaction.ISession session)
 {
     this.provider    = NeoDatis.Odb.OdbConfiguration.GetCoreProvider();
     this.session     = session;
     this.isCommited  = false;
     creationDateTime = NeoDatis.Tool.Wrappers.OdbTime.GetCurrentTimeInMs();
     writeActions     = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Transaction.IWriteAction
                                                                      >(1000);
     hasAllWriteActionsInMemory = true;
     numberOfWriteActions       = 0;
     hasBeenPersisted           = false;
     wasRollbacked            = false;
     currentWritePositionInWA = -1;
 }
Beispiel #3
0
 public override NeoDatis.Odb.Core.Transaction.ISession BuildDefaultSession()
 {
     NeoDatis.Odb.Core.ICoreProvider provider = NeoDatis.Odb.OdbConfiguration.GetCoreProvider
                                                    ();
     if (sessionManager == null)
     {
         sessionManager = provider.GetClientServerSessionManager();
     }
     NeoDatis.Odb.Core.Transaction.ISession session = provider.GetServerSession(this,
                                                                                "default");
     //FIXME Remove commented line
     //session.setBaseIdentification(((ServerFileParameter) this.getBaseIdentification()).getBaseName());
     return(session);
 }
 /// <param name="objectWriter">The object writer</param>
 /// <param name="objectReader">The object reader</param>
 /// <param name="currentBlockIdPosition">The position of the current block</param>
 /// <param name="currentBlockIdNumber">The number of the current block</param>
 /// <param name="currentMaxId">Maximum Database id</param>
 public DefaultIdManager(NeoDatis.Odb.Core.Layers.Layer3.IObjectWriter objectWriter
                         , NeoDatis.Odb.Core.Layers.Layer3.IObjectReader objectReader, long currentBlockIdPosition
                         , int currentBlockIdNumber, NeoDatis.Odb.OID currentMaxId)
 {
     this.provider               = NeoDatis.Odb.OdbConfiguration.GetCoreProvider();
     this.objectWriter           = objectWriter;
     this.objectReader           = objectReader;
     this.session                = objectWriter.GetSession();
     this.currentBlockIdPosition = currentBlockIdPosition;
     this.currentBlockIdNumber   = currentBlockIdNumber;
     this.maxId = provider.GetObjectOID((long)currentBlockIdNumber * NeoDatis.Odb.OdbConfiguration
                                        .GetNB_IDS_PER_BLOCK(), 0);
     this.nextId = provider.GetObjectOID(currentMaxId.GetObjectId() + 1, 0);
     lastIds     = new NeoDatis.Odb.OID[IdBufferSize];
     for (int i = 0; i < IdBufferSize; i++)
     {
         lastIds[i] = NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant.NullObjectId;
     }
     lastIdPositions = new long[IdBufferSize];
     lastIdIndex     = 0;
 }
		/// <param name="objectWriter">The object writer</param>
		/// <param name="objectReader">The object reader</param>
		/// <param name="currentBlockIdPosition">The position of the current block</param>
		/// <param name="currentBlockIdNumber">The number of the current block</param>
		/// <param name="currentMaxId">Maximum Database id</param>
		public DefaultIdManager(NeoDatis.Odb.Core.Layers.Layer3.IObjectWriter objectWriter
			, NeoDatis.Odb.Core.Layers.Layer3.IObjectReader objectReader, long currentBlockIdPosition
			, int currentBlockIdNumber, NeoDatis.Odb.OID currentMaxId)
		{
			this.provider = NeoDatis.Odb.OdbConfiguration.GetCoreProvider();
			this.objectWriter = objectWriter;
			this.objectReader = objectReader;
			this.session = objectWriter.GetSession();
			this.currentBlockIdPosition = currentBlockIdPosition;
			this.currentBlockIdNumber = currentBlockIdNumber;
			this.maxId = provider.GetObjectOID((long)currentBlockIdNumber * NeoDatis.Odb.OdbConfiguration
				.GetNB_IDS_PER_BLOCK(), 0);
			this.nextId = provider.GetObjectOID(currentMaxId.GetObjectId() + 1, 0);
			lastIds = new NeoDatis.Odb.OID[IdBufferSize];
			for (int i = 0; i < IdBufferSize; i++)
			{
				lastIds[i] = NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant.NullObjectId;
			}
			lastIdPositions = new long[IdBufferSize];
			lastIdIndex = 0;
		}
		public virtual void Init(NeoDatis.Odb.Core.Transaction.ISession session)
		{
			this.provider = NeoDatis.Odb.OdbConfiguration.GetCoreProvider();
			this.session = session;
			this.isCommited = false;
			creationDateTime = NeoDatis.Tool.Wrappers.OdbTime.GetCurrentTimeInMs();
			writeActions = new NeoDatis.Tool.Wrappers.List.OdbArrayList<NeoDatis.Odb.Core.Transaction.IWriteAction
				>(1000);
			hasAllWriteActionsInMemory = true;
			numberOfWriteActions = 0;
			hasBeenPersisted = false;
			wasRollbacked = false;
			currentWritePositionInWA = -1;
		}
Beispiel #7
0
 public static void SetCoreProvider(NeoDatis.Odb.Core.ICoreProvider coreProvider)
 {
     NeoDatis.Odb.OdbConfiguration.coreProvider = coreProvider;
 }
		public static void SetCoreProvider(NeoDatis.Odb.Core.ICoreProvider coreProvider)
		{
			NeoDatis.Odb.OdbConfiguration.coreProvider = coreProvider;
		}