Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
4,200 | public class RecordScannerTest
{
@Test
public void shouldProcessRecordsAndUpdateProgress() throws Exception
{
// given
ProgressMonitorFactory.MultiPartBuilder progressBuilder = mock( ProgressMonitorFactory.MultiPartBuilder.class );
ProgressListener progressListener = mock( ProgressLi... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_RecordScannerTest.java |
4,201 | public class RecordScanner<RECORD> implements StoppableRunnable
{
private final ProgressListener progress;
private final BoundedIterable<RECORD> store;
private final RecordProcessor<RECORD> processor;
private volatile boolean continueScanning = true;
public RecordScanner( BoundedIterable<RECORD> s... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_RecordScanner.java |
4,202 | public class PropertyReader
{
private final PropertyStore propertyStore;
public PropertyReader( PropertyStore propertyStore )
{
this.propertyStore = propertyStore;
}
public List<PropertyBlock> propertyBlocks( NodeRecord nodeRecord )
{
Collection<PropertyRecord> records = proper... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_PropertyReader.java |
4,203 | static class UnknownOwner extends PropertyOwner<PrimitiveRecord> implements RecordReference<PrimitiveRecord>
{
private PendingReferenceCheck<PrimitiveRecord> reporter;
@Override
RecordReference<PrimitiveRecord> record( RecordAccess records )
{
// Getting the record f... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_PropertyOwner.java |
4,204 | static class OwningRelationship extends PropertyOwner<RelationshipRecord>
{
private final long id;
OwningRelationship( RelationshipRecord record )
{
this.id = record.getId();
}
@Override
RecordReference<RelationshipRecord> record( RecordAccess record... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_PropertyOwner.java |
4,205 | static class OwningNode extends PropertyOwner<NodeRecord>
{
private final long id;
OwningNode( NodeRecord record )
{
this.id = record.getId();
}
@Override
RecordReference<NodeRecord> record( RecordAccess records )
{
return records... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_PropertyOwner.java |
4,206 | public class NodeInUseWithCorrectLabelsCheck
<RECORD extends AbstractBaseRecord, REPORT extends ConsistencyReport.NodeInUseWithCorrectLabelsReport>
implements ComparativeRecordChecker<RECORD, NodeRecord, REPORT>
{
private final long[] expectedLabels;
public NodeInUseWithCorrectLabelsCheck( long... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_NodeInUseWithCorrectLabelsCheck.java |
4,207 | {
@Override
public PrimitiveLongIterator lookup( Object value )
{
if ( entries.containsKey( value ) )
{
return asPrimitiveIterator( entries.get( value ) );
}
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_NodeCorrectlyIndexedCheckTest.java |
4,208 | private static class IndexAccessorStub implements IndexAccessor
{
private final Map<Object, long[]> entries;
private IndexAccessorStub( Map<Object, long[]> entries )
{
this.entries = entries;
}
@Override
public IndexReader newReader()
{
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_NodeCorrectlyIndexedCheckTest.java |
4,209 | public class NodeCorrectlyIndexedCheckTest
{
private static final int indexId = 12;
private static final int labelId = 34;
private static final int propertyKeyId = 56;
private static final long constraintId = 78;
@Test
public void shouldBeSilentWhenNodesCorrectlyIndexed() throws Exception
{... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_NodeCorrectlyIndexedCheckTest.java |
4,210 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
NodeRecord nodeRecord = new NodeRecord( next.node(), -1, -1 );
DynamicRe... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,211 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
NodeRecord nodeRecord = new NodeRecord( next.node(), -1, -1 );
NodeLabel... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,212 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
tx.create( new NodeRecord( next.node(), next.relationship(), -1 ) );
}
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,213 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
inconsistentKey.set( next.propertyKey() );
tx.propertyKey( inconsistentK... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,214 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
inconsistentName.set( next.propertyKey() );
tx.propertyKey( inconsistent... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,215 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
inconsistentName.set( next.relationshipType() );
tx.relationshipType( in... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,216 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
DynamicRecord array = new DynamicRecord( next.arrayProperty() );
array.s... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,217 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
NeoStoreRecord record = new NeoStoreRecord();
record.setNextProp( next.p... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,218 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
int ruleId1 = (int) next.schema();
int ruleId2 = (int) next.schema();
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,219 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
int ruleId1 = (int) next.schema();
int ruleId2 = (int) next.schema();
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,220 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
DynamicRecord schema = new DynamicRecord( next.schema() );
DynamicRecord... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,221 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
DynamicRecord string = new DynamicRecord( next.stringProperty() );
strin... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,222 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
PropertyRecord property = new PropertyRecord( next.property() );
propert... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,223 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
tx.create( new RelationshipRecord( next.relationship(), 1, 2, 0 ) );
}
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,224 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
tx.nodeLabel( 42, "Label" );
NodeRecord nodeRecord = new NodeRecord( ne... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,225 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
tx.nodeLabel( 42, "Label" );
NodeRecord nodeRecord = new NodeRecord( ne... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,226 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
NodeRecord nodeRecord = new NodeRecord( next.node(), -1, -1 );
DynamicRe... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,227 | { // Neo4j can create no more than one label per transaction...
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
In... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,228 | {
@Override
protected void generateInitialData( GraphDatabaseService graphDb )
{
try ( org.neo4j.graphdb.Transaction tx = graphDb.beginTx())
{
graphDb.schema().indexFor( label("label3") ).on( "key" ).create();
graphDb.schema().constrain... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,229 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
DynamicRecord record1 = inUse( new DynamicRecord( chain.get( 0 ).getId() ) );
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,230 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
NodeRecord node = new NodeRecord( 42, -1, -1 );
node.setInUse( true );
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,231 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
NodeRecord node = new NodeRecord( 42, -1, -1 );
node.setInUse( true );
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,232 | ARRAYS
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getNodeStore();
}
}; | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java |
4,233 | public class NodeCorrectlyIndexedCheck implements RecordCheck<NodeRecord, ConsistencyReport.NodeConsistencyReport>
{
private final IndexAccessors indexes;
private final PropertyReader propertyReader;
public NodeCorrectlyIndexedCheck( IndexAccessors indexes,
PropertyRea... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_NodeCorrectlyIndexedCheck.java |
4,234 | @RunWith(JUnit4.class)
public static class Strings extends MultiPassStoreTest
{
@Override
protected MultiPassStore multiPassStore()
{
return MultiPassStore.STRINGS;
}
@Override
protected RecordReference<DynamicRecord> record( DiffRecordAccess filt... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_MultiPassStoreTest.java |
4,235 | @RunWith(JUnit4.class)
public static class Relationships extends MultiPassStoreTest
{
@Override
protected MultiPassStore multiPassStore()
{
return MultiPassStore.RELATIONSHIPS;
}
@Override
protected RecordReference<RelationshipRecord> record( Diff... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_MultiPassStoreTest.java |
4,236 | @RunWith(JUnit4.class)
public static class Properties extends MultiPassStoreTest
{
@Override
protected MultiPassStore multiPassStore()
{
return MultiPassStore.PROPERTIES;
}
@Override
protected RecordReference<PropertyRecord> record( DiffRecordAcce... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_MultiPassStoreTest.java |
4,237 | @RunWith(JUnit4.class)
public static class Nodes extends MultiPassStoreTest
{
@Override
protected MultiPassStore multiPassStore()
{
return MultiPassStore.NODES;
}
@Override
protected RecordReference<NodeRecord> record( DiffRecordAccess filter, lon... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_MultiPassStoreTest.java |
4,238 | @RunWith(JUnit4.class)
public static class Arrays extends MultiPassStoreTest
{
@Override
protected MultiPassStore multiPassStore()
{
return MultiPassStore.ARRAYS;
}
@Override
protected RecordReference<DynamicRecord> record( DiffRecordAccess filter... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_MultiPassStoreTest.java |
4,239 | @RunWith(Suite.class)
@Suite.SuiteClasses({
MultiPassStoreTest.Nodes.class,
MultiPassStoreTest.Relationships.class,
MultiPassStoreTest.Properties.class,
MultiPassStoreTest.Strings.class,
MultiPassStoreTest.Arrays.class
})
public abstract class MultiPassStoreTest
{
@Test
p... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_MultiPassStoreTest.java |
4,240 | static class Factory
{
private final CheckDecorator decorator;
private final DiffRecordAccess recordAccess;
private final long totalMappedMemory;
private final StoreAccess storeAccess;
private final InconsistencyReport report;
Factory( CheckDecorator decorator, l... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java |
4,241 | STRINGS
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getNodeStore();
}
}, | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java |
4,242 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
long nodeId = ((long[]) getRightArray( readFullByteArrayFromHeavyRecords( chain, ARRAY )... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,243 | PROPERTIES
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getPropertyStore();
}
}, | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java |
4,244 | RELATIONSHIPS
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getRelationshipStore();
}
}, | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java |
4,245 | NODES
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getNodeStore();
}
}, | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java |
4,246 | public class LabelsMatchCheck implements
RecordCheck<NodeRecord, ConsistencyReport.LabelsMatchReport>
{
private final LabelScanReader labelScanReader;
public LabelsMatchCheck( LabelScanReader labelScanReader )
{
this.labelScanReader = labelScanReader;
}
@Override
public void ch... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_LabelsMatchCheck.java |
4,247 | {
}; | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_IterableStore.java |
4,248 | public class IterableStore<RECORD extends AbstractBaseRecord> implements BoundedIterable<RECORD>
{
private final RecordStore<RECORD> store;
public IterableStore( RecordStore<RECORD> store )
{
this.store = store;
}
@Override
public long maxCount()
{
return store.getHighId();... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_IterableStore.java |
4,249 | public class IndexCheck implements RecordCheck<IndexEntry, ConsistencyReport.IndexConsistencyReport>
{
private final IndexRule indexRule;
public IndexCheck( IndexRule indexRule )
{
this.indexRule = indexRule;
}
@Override
public void check( IndexEntry record, CheckerEngine<IndexEntry, C... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_IndexCheck.java |
4,250 | private static class Reference<T>
{
private T value;
void set(T value)
{
this.value = value;
}
T get()
{
return value;
}
@Override
public String toString()
{
return String.valueOf( value );
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_FullCheckIntegrationTest.java |
4,251 | class DynamicRecordCheck
implements RecordCheck<DynamicRecord, ConsistencyReport.DynamicConsistencyReport>,
ComparativeRecordChecker<DynamicRecord, DynamicRecord, ConsistencyReport.DynamicConsistencyReport>
{
private final int blockSize;
private final DynamicStore dereference;
private final ... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_DynamicRecordCheck.java |
4,252 | public abstract class AbstractStoreProcessor extends RecordStore.Processor<RuntimeException>
{
private final RecordCheck<NodeRecord, ConsistencyReport.NodeConsistencyReport> nodeChecker;
private final RecordCheck<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> relationshipChecker;
priva... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_AbstractStoreProcessor.java |
4,253 | {{
put( new InstanceId( 1 ), URI.create( "ha://1" ) );
put( new InstanceId( 2 ), URI.create( "ha://2" ) );
}} | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatIAmAliveProcessorTest.java |
4,254 | public class FailingException extends RuntimeException
{
public FailingException( String message )
{
super( message );
}
} | false | enterprise_com_src_test_java_org_neo4j_com_FailingException.java |
4,255 | {
@Override
public int read( byte[] b ) throws IOException
{
readBytes( b );
return b.length;
}
@Override
public int read( byte[] b, int off, int len ) throws IOException
{
readBy... | false | enterprise_com_src_main_java_org_neo4j_com_DechunkingChannelBuffer.java |
4,256 | public class DechunkingChannelBuffer implements ChannelBuffer
{
private final BlockingReadHandler<ChannelBuffer> reader;
private ChannelBuffer buffer;
private boolean more;
private boolean hasMarkedReaderIndex;
private final long timeoutMillis;
private boolean failure;
private final byte app... | false | enterprise_com_src_main_java_org_neo4j_com_DechunkingChannelBuffer.java |
4,257 | public class DataProducer implements ReadableByteChannel
{
private int bytesLeftToProduce;
private boolean closed;
public DataProducer( int size )
{
this.bytesLeftToProduce = size;
}
@Override
public boolean isOpen()
{
return !closed;
}
@Override
public... | false | enterprise_com_src_test_java_org_neo4j_com_DataProducer.java |
4,258 | {
@Override
public void handle( Exception e )
{
}
}; | false | enterprise_com_src_main_java_org_neo4j_com_ConnectionLostHandler.java |
4,259 | public class ComException extends RuntimeException
{
public ComException()
{
super();
}
public ComException( String message, Throwable cause )
{
super( message, cause );
}
public ComException( String message )
{
super( message );
}
public ComException( ... | false | enterprise_com_src_main_java_org_neo4j_com_ComException.java |
4,260 | public class ClientCrashingWriter implements MadeUpWriter
{
private final MadeUpClient client;
private final int crashAtSize;
private int totalSize;
public ClientCrashingWriter( MadeUpClient client, int crashAtSize )
{
this.client = client;
this.crashAtSize = crashAtSize;
}
... | false | enterprise_com_src_test_java_org_neo4j_com_ClientCrashingWriter.java |
4,261 | {
@Override
public void release()
{
channelPool.release();
}
}; | false | enterprise_com_src_main_java_org_neo4j_com_Client.java |
4,262 | {
@Override
protected Triplet<Channel, ChannelBuffer, ByteBuffer> create()
{
ChannelFuture channelFuture = bootstrap.connect( address );
channelFuture.awaitUninterruptibly( 5, TimeUnit.SECONDS );
Triplet<Channel, ChannelBuffer, ... | false | enterprise_com_src_main_java_org_neo4j_com_Client.java |
4,263 | public abstract class Client<T> extends LifecycleAdapter implements ChannelPipelineFactory
{
// Max number of concurrent channels that may exist. Needs to be high because we
// don't want to run into that limit, it will make some #acquire calls block and
// gets disastrous if that thread is holding monitors... | false | enterprise_com_src_main_java_org_neo4j_com_Client.java |
4,264 | public class ChunkingChannelBuffer implements ChannelBuffer, ChannelFutureListener
{
static final byte CONTINUATION_LAST = 0;
static final byte CONTINUATION_MORE = 1;
static final byte OUTCOME_SUCCESS = 0;
static final byte OUTCOME_FAILURE = 1;
private static final int MAX_WRITE_AHEAD_CHUNKS = 5;
... | false | enterprise_com_src_main_java_org_neo4j_com_ChunkingChannelBuffer.java |
4,265 | public class BlockLogReader implements ReadableByteChannel
{
private final ChannelBuffer source;
private final byte[] byteArray = new byte[BlockLogBuffer.MAX_SIZE];
private final ByteBuffer byteBuffer = ByteBuffer.wrap( byteArray );
private boolean moreBlocks;
public BlockLogReader( ChannelBuffer s... | false | enterprise_com_src_main_java_org_neo4j_com_BlockLogReader.java |
4,266 | public class BlockLogBuffer implements LogBuffer
{
// First byte of every chunk that is not the last one
static final byte FULL_BLOCK_AND_MORE = 0;
static final int MAX_SIZE = 256; /* soft limit, incl. header */
static final int DATA_SIZE = MAX_SIZE-1;
private final ChannelBuffer target;
privat... | false | enterprise_com_src_main_java_org_neo4j_com_BlockLogBuffer.java |
4,267 | public class Quorums
{
/** Determines if a number of available members qualify as a majority, given the total number of members. */
public static boolean isQuorum( long availableMembers, long totalMembers )
{
return availableMembers >= Math.floor((totalMembers/2) + 1);
}
} | false | enterprise_cluster_src_main_java_org_neo4j_cluster_util_Quorums.java |
4,268 | public class Timeout
{
private long timeout;
private Message<? extends MessageType> timeoutMessage;
public Timeout( long timeout, Message<? extends MessageType> timeoutMessage )
{
this.timeout = timeout;
this.timeoutMessage = timeoutMessage;
}
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_timeout_Timeouts.java |
4,269 | public class Timeouts implements MessageSource
{
private long now = 0;
private MessageProcessor receiver;
private TimeoutStrategy timeoutStrategy;
private Map<Object, Timeout> timeouts = new HashMap<Object, Timeout>();
private List<Map.Entry<Object, Timeout>> triggeredTimeouts = new ArrayList<Map.... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_timeout_Timeouts.java |
4,270 | public class MessageTimeoutStrategy
implements TimeoutStrategy
{
Map<MessageType, Long> timeouts = new HashMap<MessageType, Long>();
private TimeoutStrategy delegate;
public MessageTimeoutStrategy( TimeoutStrategy delegate )
{
this.delegate = delegate;
}
public MessageTimeoutS... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_timeout_MessageTimeoutStrategy.java |
4,271 | {
@Override
public boolean process( Message<? extends MessageType> message )
{
synchronized(LatencyCalculator.this)
{
Long sent = conversations.get( message.getHeader( Message.CONVERSATION_ID ) );
if (sen... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_timeout_LatencyCalculator.java |
4,272 | public class LatencyCalculator
implements MessageProcessor, TimeoutStrategy
{
TimeoutStrategy delegate;
Map<String, Long> conversations = new HashMap<String, Long>( );
Map<String, List<Long>> latencies = new HashMap<String, List<Long>>( );
Logger logger = LoggerFactory.getLogger(LatencyCalculat... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_timeout_LatencyCalculator.java |
4,273 | public class FixedTimeoutStrategy
implements TimeoutStrategy
{
protected final long timeout;
public FixedTimeoutStrategy(long timeout)
{
this.timeout = timeout;
}
@Override
public long timeoutFor( Message message )
{
return timeout;
}
@Override
public void... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_timeout_FixedTimeoutStrategy.java |
4,274 | public class FailingByteChannel extends KnownDataByteChannel
{
private final String failWithMessage;
private final int sizeToFailAt;
public FailingByteChannel( int sizeToFailAt, String failWithMessage )
{
super( sizeToFailAt*2 );
this.sizeToFailAt = sizeToFailAt;
this.failWithMe... | false | enterprise_com_src_test_java_org_neo4j_com_FailingByteChannel.java |
4,275 | public class IllegalProtocolVersionException extends ComException
{
private final int expected;
private final int received;
public IllegalProtocolVersionException( int expected, int received )
{
super();
this.expected = expected;
this.received = received;
}
public Illeg... | false | enterprise_com_src_main_java_org_neo4j_com_IllegalProtocolVersionException.java |
4,276 | public class StateTransitionLogger
implements StateTransitionListener
{
private final Logging logging;
/** Throttle so don't flood occurences of the same message over and over */
private String lastLogMessage = "";
public StateTransitionLogger( Logging logging )
{
this.logging = lo... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateTransitionLogger.java |
4,277 | public class KnownDataByteChannel implements ReadableByteChannel
{
protected int position;
private final int size;
public KnownDataByteChannel( int size )
{
this.size = size;
}
@Override
public boolean isOpen()
{
return true;
}
@Override
public void... | false | enterprise_com_src_test_java_org_neo4j_com_KnownDataByteChannel.java |
4,278 | public class MadeUpServerProcess extends SubProcess<ServerInterface, StartupData> implements ServerInterface
{
private static final long serialVersionUID = 1L;
public static final int PORT = 8888;
private volatile transient MadeUpServer server;
@Override
protected void startup( StartupData data )... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServerProcess.java |
4,279 | public class MadeUpServerImplementation implements MadeUpCommunicationInterface
{
private final StoreId storeIdToRespondWith;
private boolean gotCalled;
public MadeUpServerImplementation( StoreId storeIdToRespondWith )
{
this.storeIdToRespondWith = storeIdToRespondWith;
}
@Override
... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServerImplementation.java |
4,280 | {
@Override
public Response<Integer> call( MadeUpCommunicationInterface master,
RequestContext context, ChannelBuffer input, ChannelBuffer target )
{
throw new ThisShouldNotHappenError( "Jake", "Test should not reach this far, " +
... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,281 | {
@Override
public Response<Integer> call( MadeUpCommunicationInterface master,
RequestContext context, ChannelBuffer input, ChannelBuffer target )
{
return master.throwException( readString( input ) );
}
... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,282 | {
@Override
public Response<Void> call( MadeUpCommunicationInterface master,
RequestContext context, ChannelBuffer input, ChannelBuffer target )
{
BlockLogReader reader = new BlockLogReader( input );
try
... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,283 | {
@Override
public Response<Void> call( MadeUpCommunicationInterface master,
RequestContext context, ChannelBuffer input, ChannelBuffer target )
{
int dataSize = input.readInt();
return master.fetchDataSt... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,284 | {
@Override
public Response<Integer> call( MadeUpCommunicationInterface master,
RequestContext context, ChannelBuffer input, ChannelBuffer target )
{
int value1 = input.readInt();
int value2 = input.re... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,285 | {
@Override
public long getOldChannelThreshold()
{
return Client.DEFAULT_READ_RESPONSE_TIMEOUT_SECONDS * 1000;
}
@Override
public int getMaxConcurrentTransactions()
{
return DEFAULT_MAX_NUMBER_OF... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,286 | public class MadeUpServer extends Server<MadeUpCommunicationInterface, Void>
{
private volatile boolean responseWritten;
private volatile boolean responseFailureEncountered;
private final byte internalProtocolVersion;
public static final int FRAME_LENGTH = 1024 * 1024 * 1;
public MadeUpServer( Made... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServer.java |
4,287 | public class MadeUpException extends RuntimeException
{
public MadeUpException( String message )
{
super( message );
}
public MadeUpException( String message, Throwable cause )
{
super( message, cause );
}
} | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpException.java |
4,288 | {
public Integer read( ChannelBuffer buffer, ByteBuffer temporaryBuffer )
throws IOException
{
return buffer.readInt();
}
} ); | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,289 | {
@Override
public void write( ChannelBuffer buffer ) throws IOException
{
writeString( buffer, messageInException );
}
}, new Deserializer<Integer>() | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,290 | {
@Override
public void write( ChannelBuffer buffer ) throws IOException
{
BlockLogBuffer writer = new BlockLogBuffer( buffer, new Monitors().newMonitor( ByteCounterMonitor.class ) );
try
{
writer.write( data... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,291 | {
@Override
public Void read( ChannelBuffer buffer, ByteBuffer temporaryBuffer )
throws IOException
{
writer.write( new BlockLogReader( buffer ) );
return null;
}
} ); | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,292 | {
@Override
public void write( ChannelBuffer buffer ) throws IOException
{
buffer.writeInt( dataSize );
}
}, new Deserializer<Void>() | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,293 | {
@Override
public void write( ChannelBuffer buffer ) throws IOException
{
buffer.writeInt( value1 );
buffer.writeInt( value2 );
}
}, Protocol.INTEGER_DESERIALIZER ); | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,294 | public class MadeUpClient extends Client<MadeUpCommunicationInterface> implements MadeUpCommunicationInterface
{
private final byte internalProtocolVersion;
public MadeUpClient( int port, StoreId storeIdToExpect,
byte internalProtocolVersion, byte applicationProtocolVersion, int chunkSize )
{
... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpClient.java |
4,295 | public class LoggingResourcePoolMonitorTest
{
@Test
public void testUpdatedCurrentPeakSizeLogsOnlyOnChange() throws Exception
{
StringLogger logger = mock( StringLogger.class );
LoggingResourcePoolMonitor monitor = new LoggingResourcePoolMonitor( logger );
monitor.updatedCurrentPeak... | false | enterprise_com_src_test_java_org_neo4j_com_LoggingResourcePoolMonitorTest.java |
4,296 | public class LoggingResourcePoolMonitor extends ResourcePool.Monitor.Adapter<Triplet<Channel, ChannelBuffer, ByteBuffer>>
{
private final StringLogger msgLog;
private int lastCurrentPeakSize = -1;
private int lastTargetSize = -1;
public LoggingResourcePoolMonitor( StringLogger msgLog )
{
th... | false | enterprise_com_src_main_java_org_neo4j_com_LoggingResourcePoolMonitor.java |
4,297 | public class StateTransitionLoggerTest
{
@Test
public void shouldThrottle() throws Exception
{
// Given
Logging logging = mock( Logging.class );
StringLogger logger = mock(StringLogger.class);
when(logging.getMessagesLog( any(Class.class) )).thenReturn( logger );
when... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_statemachine_StateTransitionLoggerTest.java |
4,298 | public class StateTransition
{
private State<?,?> oldState;
private Message<? extends MessageType> message;
private State<?,?> newState;
public StateTransition( State<?,?> oldState, Message<? extends MessageType> message, State<?,?> newState )
{
this.oldState = oldState;
this.messag... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateTransition.java |
4,299 | public class ConsistencyCheckingError extends DataInconsistencyError
{
private final ConsistencySummaryStatistics summary;
public ConsistencyCheckingError( LogEntry.Start startEntry, LogEntry.Commit commitEntry,
ConsistencySummaryStatistics summary )
{
super( St... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_ConsistencyCheckingError.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.