예제 #1
0
 protected ResourceBase(JournaledSystem journaledSystem, long id, string name, IStoreData data)
 {
     JournaledSystem = journaledSystem;
     this.id = id;
     Name = name;
     Data = data;
 }
예제 #2
0
        public JournalFile(JournaledSystem journaledSystem, IFileSystem fileSystem, string path, bool readOnly)
        {
            JournaledSystem = journaledSystem;
            FileSystem = fileSystem;
            FilePath = path;
            ReadOnly = readOnly;

            buffer = new byte[36];
            resourceIdMap = new Dictionary<string, long>();
            cur_seq_id = 0;
            reference_count = 1;
        }
예제 #3
0
        public LoggingResource(JournaledSystem journaledSystem, long id, string name, IStoreData data)
            : base(journaledSystem, id, name, data)
        {
            journalMap = new JournalEntry[257];
            dataOpen = false;
            dataExists = data.Exists;
            dataDeleted = false;

            if (dataExists) {
                try {
                    size = data.Length;
                } catch (IOException e) {
                    throw new Exception("Error getting size of resource: " + e.Message);
                }
            }

            reallyOpen = false;
            pageBuffer = new byte[journaledSystem.PageSize];
        }
예제 #4
0
 public NonLoggingResource(JournaledSystem journaledSystem, long id, string name, IStoreData data)
     : base(journaledSystem, id, name, data)
 {
 }