This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
public class CommandBatch | |
{ | |
public readonly Command[] Commands; | |
public CommandBatch(IEnumerable<Command> commands) | |
{ | |
Commands = commands.ToArray(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AckAck | |
{ | |
public class EventStoreJournal : IJournalWriter | |
{ | |
private readonly IEventStoreConnection _eventStore; | |
private readonly IFormatter _formatter; | |
public EventStoreJournal(IEventStoreConnection connection) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Batch size: 10 | |
async elapsed: 00:00:09.3169992 | |
Batch size: 20 | |
[INFO][2014-10-16 21:45:26][Thread 0013][akka://prevayler/deadLetters] Message ReceiveTimeout from NoSender to akka://prevayler/deadLetters was not delivered. 1 dead letters encountered. | |
async elapsed: 00:00:04.0975454 | |
Batch size: 40 | |
async elapsed: 00:00:02.2847282 | |
Batch size: 80 | |
async elapsed: 00:00:01.2958812 | |
Batch size: 160 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[03528,10,19:58:56.693] Command exited with code 0. | |
[03528,07,19:58:56.693] Completed. Successes: 1000000, failures: 0 (WRONG VERSION: 0, P: 0, C: 0, F: 0, D: 0) | |
[03528,07,19:58:56.693] 1000000 requests completed in 62640ms (15964,24 reqs per sec). | |
[03528,07,19:58:56.743] [[begin | |
DataName:WRFL; | |
clientsCnt:10;requestsCnt:1000000;ElapsedMilliseconds:62640; | |
successes:1000000;failures:0; | |
end]] | |
[03528,07,19:58:56.743] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Batch size: 10 | |
async elapsed: 00:00:02.8304468 | |
Batch size: 20 | |
PostStop called | |
[INFO][2014-10-15 11:08:37][Thread 0013][akka://prevayler/deadLetters] Message ReceiveTimeout from akka://prevayler/user/$c to akka://prevayler/deadLetters was not delivered. 1 dead letters encountered. | |
[INFO][2014-10-15 11:08:37][Thread 0013][akka://prevayler/deadLetters] Message DeathWatchNotification from akka://prevayler/deadLetters to akka://prevayler/deadLetters was not delivered. 2 dead letters encountered. | |
[INFO][2014-10-15 11:08:37][Thread 0013][akka://prevayler/deadLetters] Message DeathWatchNotification from akka://prevayler/deadLetters to akka://prevayler/deadLetters was not delivered. 3 dead letters encountered. | |
[INFO][2014-10-15 11:08:37][Thread 0011][akka://prevayler/deadLetters] Message DeathWatchNotification from akka://prevayler/deadLetters to akka://prevayler/deadLetters was not delivered. 4 dead letters encountered. | |
async elapsed: 00:00:01.3089383 | |
Batch size: 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Register or reregister a generic handler | |
/// </summary> | |
public void Subscribe(Action<IEvent> eventHandler, Func<IEvent, bool> selector = null) | |
{ | |
_eventHandlers[new DelegateHandler(eventHandler)] = selector != null | |
? new DelegateSelector(selector) | |
: DelegateSelector.Any; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Actor | |
{ | |
public abstract void OnTokenReceived(); | |
} | |
public class TokenRing | |
{ | |
List<Actor> _actors = new List<Actor>(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try (Grid g = GridGain.start()) { | |
Collection<GridCallable<Integer>> calls = new ArrayList<>(); | |
// Iterate through all the words in the sentence and create Callable jobs. | |
for (final String word : "Count characters using callable".split(" ")) { | |
calls.add(new GridCallable<Integer>() { | |
@Override public Integer call() throws Exception { | |
return word.length(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod()] | |
public void MenuSmokeTest() | |
{ | |
var engine = Engine.LoadOrCreate<CmsModel>("c:\\livedb\\cms"); | |
var page = new Page(Guid.NewGuid(), DateTime.Now); | |
page.Contents = "Hello, world!"; | |
Command command = new PutPageCommand(page); | |
engine.Execute(command); | |
Menu menu = new Menu{Name = "_main"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
public class RemoveMenuCommand : Command<CmsModel> | |
{ | |
public readonly string MenuName; | |
public RemoveMenuCommand(string menuName) | |
{ | |
MenuName = menuName; | |
} | |