private MsgD WriteImmediateQueryResult(AbstractQueryResult queryResult, ObjectExchangeConfiguration config) { var idIterator = queryResult.IterateIDs(); var message = BuildQueryResultMessage(0, idIterator, queryResult.Size(), config); return message; }
public static IObjectExchangeStrategy ForConfig(ObjectExchangeConfiguration config ) { if (config.prefetchDepth > 0) { return new EagerObjectExchangeStrategy(config); } return DeferredObjectExchangeStrategy.Instance; }
protected MsgD WriteQueryResult(AbstractQueryResult queryResult, QueryEvaluationMode evaluationMode, ObjectExchangeConfiguration config) { if (evaluationMode == QueryEvaluationMode.Immediate) { return WriteImmediateQueryResult(queryResult, config); } return WriteLazyQueryResult(queryResult, config); }
public static IObjectExchangeStrategy ForConfig(ObjectExchangeConfiguration config ) { if (config.prefetchDepth > 0) { return(new EagerObjectExchangeStrategy(config)); } return(DeferredObjectExchangeStrategy.Instance); }
private MsgD BuildQueryResultMessage(int queryResultId, IIntIterator4 ids, int maxCount , ObjectExchangeConfiguration config) { var payload = ObjectExchangeStrategyFactory.ForConfig(config).Marshall ((LocalTransaction) Transaction(), ids, maxCount); var message = QueryResult.GetWriterForLength(Transaction(), Const4.IntLength + payload .Length()); var writer = message.PayLoad(); writer.WriteInt(queryResultId); writer.WriteBytes(payload._buffer); return message; }
private MsgD WriteLazyQueryResult(AbstractQueryResult queryResult, ObjectExchangeConfiguration config) { var queryResultId = GenerateID(); var maxCount = Config().PrefetchObjectCount(); var idIterator = queryResult.IterateIDs(); var message = BuildQueryResultMessage(queryResultId, idIterator, maxCount, config ); var serverThread = ServerMessageDispatcher(); serverThread.MapQueryResultToID(new LazyClientObjectSetStub(queryResult, idIterator ), queryResultId); return message; }
public EagerObjectWriter(ObjectExchangeConfiguration config, LocalTransaction transaction ) { _config = config; _transaction = transaction; }
public EagerObjectExchangeStrategy(ObjectExchangeConfiguration config) { _config = config; }
public EagerObjectExchangeStrategy(ObjectExchangeConfiguration config) { _config = config; }
public EagerObjectWriter(ObjectExchangeConfiguration config, LocalTransaction transaction ) { _config = config; _transaction = transaction; }