Exemplo n.º 1
0
            internal virtual void VisitAllIds(ClusterMember member, System.Action <long> idConsumer)
            {
                DatabaseLayout databaseLayout = DatabaseLayout.of(member.databaseDirectory());
                File           idFile         = databaseLayout.IdNodeStore();
                IdContainer    idContainer    = new IdContainer(Fs, idFile, 1024, true);

                idContainer.Init();
                Log.info(idFile.AbsolutePath + " has " + idContainer.FreeIdCount + " free ids");

                long id = idContainer.ReusableId;

                while (id != IdContainer.NO_RESULT)
                {
                    idConsumer(id);
                    id = idContainer.ReusableId;
                }

                idContainer.Close(0);
            }