{"action":"created","issue":{"url":"https://api.github.com/repos/puniverse/quasar/issues/233","repository_url":"https://api.github.com/repos/puniverse/quasar","labels_url":"https://api.github.com/repos/puniverse/quasar/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/puniverse/quasar/issues/233/comments","events_url":"https://api.github.com/repos/puniverse/quasar/issues/233/events","html_url":"https://github.com/puniverse/quasar/issues/233","id":190736660,"number":233,"title":"Allow for ActorRegistry.getOrRegisterActor not to create actor","user":{"login":"victornoel","id":160975,"avatar_url":"https://avatars.githubusercontent.com/u/160975?v=3","gravatar_id":"","url":"https://api.github.com/users/victornoel","html_url":"https://github.com/victornoel","followers_url":"https://api.github.com/users/victornoel/followers","following_url":"https://api.github.com/users/victornoel/following{/other_user}","gists_url":"https://api.github.com/users/victornoel/gists{/gist_id}","starred_url":"https://api.github.com/users/victornoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victornoel/subscriptions","organizations_url":"https://api.github.com/users/victornoel/orgs","repos_url":"https://api.github.com/users/victornoel/repos","events_url":"https://api.github.com/users/victornoel/events{/privacy}","received_events_url":"https://api.github.com/users/victornoel/received_events","type":"User","site_admin":false},"labels":[{"id":33596718,"url":"https://api.github.com/repos/puniverse/quasar/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"pron","id":1273445,"avatar_url":"https://avatars.githubusercontent.com/u/1273445?v=3","gravatar_id":"","url":"https://api.github.com/users/pron","html_url":"https://github.com/pron","followers_url":"https://api.github.com/users/pron/followers","following_url":"https://api.github.com/users/pron/following{/other_user}","gists_url":"https://api.github.com/users/pron/gists{/gist_id}","starred_url":"https://api.github.com/users/pron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pron/subscriptions","organizations_url":"https://api.github.com/users/pron/orgs","repos_url":"https://api.github.com/users/pron/repos","events_url":"https://api.github.com/users/pron/events{/privacy}","received_events_url":"https://api.github.com/users/pron/received_events","type":"User","site_admin":false},"assignees":[{"login":"pron","id":1273445,"avatar_url":"https://avatars.githubusercontent.com/u/1273445?v=3","gravatar_id":"","url":"https://api.github.com/users/pron","html_url":"https://github.com/pron","followers_url":"https://api.github.com/users/pron/followers","following_url":"https://api.github.com/users/pron/following{/other_user}","gists_url":"https://api.github.com/users/pron/gists{/gist_id}","starred_url":"https://api.github.com/users/pron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pron/subscriptions","organizations_url":"https://api.github.com/users/pron/orgs","repos_url":"https://api.github.com/users/pron/repos","events_url":"https://api.github.com/users/pron/events{/privacy}","received_events_url":"https://api.github.com/users/pron/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-11-21T14:46:10Z","updated_at":"2016-11-21T18:39:10Z","closed_at":null,"body":"Hi,\r\n\r\nI would like to be able to call `ActorRegistry.getOrRegisterActor`, but in some case, I need to delegate to the passed factory the choice of creating or not the actor (basically, my use case is that I associate an actor with a object stored in a database, and if the actor does not already exists, the factory will check if the object exists in database : if not, the actor should not be created and `null`/`Optional.empty`, for example, should be returned instead).\r\n\r\nCurrently, the factory must always create an actor, couldn't we introduce another method that would accept a `Callable<Optional<Actor<Message, ?>>>` (or use the same and accept `null` return values)."},"comment":{"url":"https://api.github.com/repos/puniverse/quasar/issues/comments/262027451","html_url":"https://github.com/puniverse/quasar/issues/233#issuecomment-262027451","issue_url":"https://api.github.com/repos/puniverse/quasar/issues/233","id":262027451,"user":{"login":"pron","id":1273445,"avatar_url":"https://avatars.githubusercontent.com/u/1273445?v=3","gravatar_id":"","url":"https://api.github.com/users/pron","html_url":"https://github.com/pron","followers_url":"https://api.github.com/users/pron/followers","following_url":"https://api.github.com/users/pron/following{/other_user}","gists_url":"https://api.github.com/users/pron/gists{/gist_id}","starred_url":"https://api.github.com/users/pron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pron/subscriptions","organizations_url":"https://api.github.com/users/pron/orgs","repos_url":"https://api.github.com/users/pron/repos","events_url":"https://api.github.com/users/pron/events{/privacy}","received_events_url":"https://api.github.com/users/pron/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T18:39:10Z","updated_at":"2016-11-21T18:39:10Z","body":"P.S.\r\n\r\n> In any event, it is not any more or less transactional than using getOrRegisterActor alone.\r\n\r\nIt may be if the factory would also *create* the DB object."}}
{"actor":{"display_login":"pron"}}