<commit_before>package org.neo4j.kernel.impl.ha;

import org.neo4j.kernel.IdType;

/**
 * Represents the master-side of the HA communication between master and slave.
 * A master will receive calls to these methods from slaves when they do stuff.
 */
public interface Master
{
    IdAllocation allocateIds( IdType idType );

    Response<Integer> createRelationshipType( SlaveContext context, String name );

    Response<LockResult> acquireNodeWriteLock( SlaveContext context, int eventIdentifier,
            long... nodes );

    Response<LockResult> acquireNodeReadLock( SlaveContext context, int eventIdentifier,
            long... nodes );

    Response<LockResult> acquireRelationshipWriteLock( SlaveContext context, int eventIdentifier,
            long... relationships );

    Response<LockResult> acquireRelationshipReadLock( SlaveContext context, int eventIdentifier,
            long... relationships );

    Response<Long> commitSingleResourceTransaction( SlaveContext context,
            int eventIdentifier, String resource, TransactionStream transactionStream );
    
    Response<Void> doneCommitting( SlaveContext context, int eventIdentifier );

    Response<Void> rollbackTransaction( SlaveContext context, int eventIdentifier );

    Response<Void> pullUpdates( SlaveContext context );
}<commit_msg>Added method for rolling back all of a slaves transactions (the master side calls it when a slave has gone down)<commit_after>package org.neo4j.kernel.impl.ha;

import org.neo4j.kernel.IdType;

/**
 * Represents the master-side of the HA communication between master and slave.
 * A master will receive calls to these methods from slaves when they do stuff.
 */
public interface Master
{
    IdAllocation allocateIds( IdType idType );

    Response<Integer> createRelationshipType( SlaveContext context, String name );

    Response<LockResult> acquireNodeWriteLock( SlaveContext context, int eventIdentifier,
            long... nodes );

    Response<LockResult> acquireNodeReadLock( SlaveContext context, int eventIdentifier,
            long... nodes );

    Response<LockResult> acquireRelationshipWriteLock( SlaveContext context, int eventIdentifier,
            long... relationships );

    Response<LockResult> acquireRelationshipReadLock( SlaveContext context, int eventIdentifier,
            long... relationships );

    Response<Long> commitSingleResourceTransaction( SlaveContext context,
            int eventIdentifier, String resource, TransactionStream transactionStream );
    
    Response<Void> doneCommitting( SlaveContext context, int eventIdentifier );

    Response<Void> rollbackTransaction( SlaveContext context, int eventIdentifier );
    
    void rollbackOngoingTransactions( SlaveContext context );

    Response<Void> pullUpdates( SlaveContext context );
}
{'fraction_non_alphanumeric': 0.07147937411095306, 'fraction_numerical': 0.001422475106685633, 'mean_word_length': 4.123861566484518, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '929495', 'n_tokens_mistral': 676, 'n_tokens_neox': 663, 'n_words': 224}