Ejemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public String getPopulationFailure(org.neo4j.storageengine.api.schema.StoreIndexDescriptor descriptor) throws IllegalStateException
        public override string GetPopulationFailure(StoreIndexDescriptor descriptor)
        {
            try
            {
                string failureMessage = NativeIndexes.ReadFailureMessage(PageCache, NativeIndexFileFromIndexId(descriptor.Id));
                if (string.ReferenceEquals(failureMessage, null))
                {
                    throw new System.InvalidOperationException("Index " + descriptor.Id + " isn't failed");
                }
                return(failureMessage);
            }
            catch (IOException e)
            {
                throw new Exception(e);
            }
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public String getPopulationFailure(org.neo4j.storageengine.api.schema.StoreIndexDescriptor descriptor) throws IllegalStateException
        public override string GetPopulationFailure(StoreIndexDescriptor descriptor)
        {
            TemporalIndexFiles temporalIndexFiles = new TemporalIndexFiles(DirectoryStructure(), descriptor, _fs);

            try
            {
                foreach (TemporalIndexFiles.FileLayout subIndex in temporalIndexFiles.Existing())
                {
                    string indexFailure = NativeIndexes.ReadFailureMessage(_pageCache, subIndex.indexFile);
                    if (!string.ReferenceEquals(indexFailure, null))
                    {
                        return(indexFailure);
                    }
                }
            }
            catch (IOException e)
            {
                throw new Exception(e);
            }
            throw new System.InvalidOperationException("Index " + descriptor.Id + " isn't failed");
        }