Skip to content

Commit

Permalink
modified loader
Browse files Browse the repository at this point in the history
  • Loading branch information
hg-ms committed Oct 31, 2023
1 parent 5c60356 commit 8d5b963
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import one.microstream.persistence.binary.exceptions.BinaryPersistenceException;
import one.microstream.persistence.binary.one.microstream.collections.BinaryHandlerSingleton;
import one.microstream.persistence.exceptions.PersistenceExceptionTypeHandlerConsistencyUnhandledTypeId;
import one.microstream.persistence.types.PersistenceAcceptor;
import one.microstream.persistence.types.PersistenceLoadHandler;
import one.microstream.persistence.types.PersistenceLoader;
import one.microstream.persistence.types.PersistenceObjectRegistry;
Expand Down Expand Up @@ -65,7 +66,7 @@ public static BinaryLoader.Creator CreatorSimple(final boolean switchByteOrder)
return new BinaryLoader.CreatorSimple(switchByteOrder);
}

public static BinaryLoader.Default New(
public static BinaryLoader New(
final PersistenceTypeHandlerLookup<Binary> typeLookup ,
final PersistenceObjectRegistry registry ,
final Persister persister ,
Expand Down Expand Up @@ -919,6 +920,15 @@ private final void requireReference(final long objectId)
this.loadItems.addLoadItem(objectId);
}

@Override
public void iterateEntries(final PersistenceAcceptor iterator)
{
synchronized(this.objectRegistry)
{
this.objectRegistry.iterateEntries(iterator);
}
}

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public interface PersistenceLoader extends PersistenceRetrieving

public void registerSkip(long objectId);

/**
* Iterate over all known objects of the current Loader
*
* @param iterator PersistenceAcceptor
*/
void iterateEntries(final PersistenceAcceptor iterator);


public interface Creator<D>
Expand Down

0 comments on commit 8d5b963

Please sign in to comment.