-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
Not failing due to tests but j2objc |
This looks quite good! |
/** | ||
* Used when requiring write acknowledgements when setting records | ||
*/ | ||
WRITE_SUCCESS( "WS" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write acknowledgement
action names need to be constant in both server and client ( code practice )
@@ -244,6 +247,85 @@ public Record set(String path, Object value ) throws DeepstreamRecordDestroyedEx | |||
} | |||
|
|||
/** | |||
* Set the value for the entire record synchronously and gives acknowledgement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the actual api we use for set? If it is we should change it to JSONObject or JSONElement since we can't set a string or number using this api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just have a warning that whatever is used must be serialisable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want users to have to do gson.toJsonTree( val ) every time?
JsonElement object = this.path.get( path ); | ||
|
||
if( object != null && object.equals( value ) ) { | ||
return new RecordSetResult(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting edge case, since write never happens so is it really a successful callback?
@@ -674,6 +769,7 @@ private void sendRead() { | |||
*/ | |||
@ObjectiveCName("sendUpdate:value:") | |||
private void sendUpdate( String key, Object value ) { | |||
this.version++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did this need to be moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because sendUpdate is called from multiple places and we always want to increase the version number. Also it is here in the js client so a bit easier to context switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense!
this.error = error; | ||
} | ||
|
||
public String getResult() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation missing
* @param data The data to send in the request | ||
* @param utilSingleNotifierCallback The callback to call once the request is completed | ||
*/ | ||
public void request( String name, String[] data, UtilSingleNotifierCallback utilSingleNotifierCallback ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like!
Travis build fixed in #47 |
No description provided.