Search found 298 matches

by mmilen
16 Feb 2022, 04:20
Forum: SFS2X Questions
Topic: Boolean RoomVariable update to the same value?
Replies: 1
Views: 1969

Boolean RoomVariable update to the same value?

If variable "isInteractive" exist and is set to true will the code below fire client and server events?

Code: Select all

sfsApi.setRoomVariables(null, parentRoom, Arrays.asList(
      new SFSRoomVariable("isInteractive", true , false, true, false)
 ), true, true, false);
by mmilen
14 Feb 2022, 08:49
Forum: SFS2X Questions
Topic: Hash Code Collision safety of JSONObject
Replies: 4
Views: 3373

Re: Hash Code Collision safety of JSONObject

Any idea about hashcode collisions of SFSObjects?
by mmilen
14 Feb 2022, 08:47
Forum: SFS2X Questions
Topic: Hash Code Collision safety of JSONObject
Replies: 4
Views: 3373

Re: Hash Code Collision safety of JSONObject

Thanks for your time. I did look at the code and didn't like the math. I needed the JSON as a key for a ConcurrentHashMap, but there seems to be an issue, two objects with identical content produced two records in the map. Using their string representation did the trick for me since it is only some ...
by mmilen
13 Feb 2022, 22:03
Forum: SFS2X Questions
Topic: Hash Code Collision safety of JSONObject
Replies: 4
Views: 3373

Hash Code Collision safety of JSONObject

Hi,

What are the % for hashcode collisions with JSONObject.hashCode()?

Milen
by mmilen
04 Feb 2022, 15:36
Forum: SFS2X Questions
Topic: Multiple log disconnect entries for the same connection
Replies: 13
Views: 7754

Re: Multiple log disconnect entries for the same connection

No luck catching who is dropping packets. I have this in the core.xml : <triggerDroppedPacketEvents>true</triggerDroppedPacketEvents> I added the listener in my zone extension Init(), which might be the wrong place. I set a user with user.getSession().getPacketQueue().setMaxSize(2); and loaded, the ...
by mmilen
01 Feb 2022, 04:25
Forum: SFS2X Questions
Topic: Admin issues after Upgrade from 2.16 to 2.18
Replies: 3
Views: 4478

Re: Admin issues after Upgrade from 2.16 to 2.18

I did a fresh install, the old installation is in its own folder.

Clearing the cache took care of
by mmilen
29 Jan 2022, 19:51
Forum: SFS2X Questions
Topic: Admin issues after Upgrade from 2.16 to 2.18
Replies: 3
Views: 4478

Admin issues after Upgrade from 2.16 to 2.18

Hi Lapo, I upgraded my pre-production server from 2.16.1 to 2.18.1. I copied 4 zome configurations and their jar files. Now the admin gives me the attached error for Zone, Extensions, and Servlet manager. The rest of the admin menus seem to work. Screen Shot 2022-01-29 at 2.50.50 PM.png Now I update...
by mmilen
29 Jan 2022, 13:36
Forum: SFS2X Questions
Topic: Multiple log disconnect entries for the same connection
Replies: 13
Views: 7754

Re: Multiple log disconnect entries for the same connection

Thanks a lot for the code sample, my cool down can be very long :). On most days there are no drops, I'm trying to see is it a user lag, or we have bad code somewhere.
by mmilen
29 Jan 2022, 05:05
Forum: SFS2X Questions
Topic: Multiple log disconnect entries for the same connection
Replies: 13
Views: 7754

Re: Multiple log disconnect entries for the same connection

Thanks. I did overlook your destroy code suggestion. That might even clear the duplicate log. Question what is a good way ( not too much over head ) to add a trace every time users' session message queue reaches a threshold. When connecting to a Zone I have this call user.getSession().getPacketQueue...
by mmilen
27 Jan 2022, 16:24
Forum: SFS2X Questions
Topic: Roomvars or Atomic vars (performance)
Replies: 13
Views: 7969

Re: Roomvars or Atomic vars (performance)

Thanks. That clears it. I was never sure if SFSApi return a copy of an object or a reference, now it is clear.
by mmilen
26 Jan 2022, 14:05
Forum: SFS2X Questions
Topic: Multiple log disconnect entries for the same connection
Replies: 13
Views: 7754

Re: Multiple log disconnect entries for the same connection

Fresh server start cleared trace duplication from my addEventHandler(SFSEventType.USER_DISCONNECT, User_Disconnect_EventHandler.class); The user is disconnected with getApi().disconnect(user.getSession()); but I still get those 3 26 Jan 2022 | 07:42:50,702 | INFO | SFSWorker:Ext:8 | v2.api.SFSApi | ...
by mmilen
26 Jan 2022, 13:02
Forum: SFS2X Questions
Topic: Multiple log disconnect entries for the same connection
Replies: 13
Views: 7754

Re: Multiple log disconnect entries for the same connection

Will this code do ( resetting all the request handlers, events, and filters ), does the order matter. Those are all added in the init method. @Override public void destroy() { removeEventHandler(SFSEventType.USER_LOGIN); removeEventHandler(SFSEventType.USER_JOIN_ZONE); removeEventHandler(SFSEventTyp...
by mmilen
26 Jan 2022, 12:48
Forum: SFS2X Questions
Topic: Roomvars or Atomic vars (performance)
Replies: 13
Views: 7969

Re: Roomvars or Atomic vars (performance)

Last question on the topic for now: After Object myobject = this.getParentRoom().getProperty("someobject", object) ; myobject.property = 1; ( value changed from 0 to 1) Do I need to do : this.getParentRoom().setProperty("someobject", myobject) ; Same for variables After I get a v...
by mmilen
26 Jan 2022, 12:11
Forum: SFS2X Questions
Topic: Multiple log disconnect entries for the same connection
Replies: 13
Views: 7754

Re: Multiple log disconnect entries for the same connection

That's it, the extension was reloaded a number of times. anyways to avoid it?
by mmilen
26 Jan 2022, 04:39
Forum: SFS2X Questions
Topic: Roomvars or Atomic vars (performance)
Replies: 13
Views: 7969

Re: Roomvars or Atomic vars (performance)

One last thing: keep in mind that the call to SFSApi().setRoomVariables(...) is a pretty complex operation that involves writing a number of RoomVariables (which is always thread safe), triggering server-side events (via separate threads), and enqueuing an update packet for each interested client w...

Go to advanced search