Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java 'struct' request

Peter QuiringNov 19 2018 — edited Nov 19 2018

I would like to see Java include a light-weight class called a 'struct'.  I originally thought that is what Valhalla was going to be but it seems to be more like a user-defined type that is not a reference.  So a Valhalla object must be 'copied' in full with each assignment.  Good for small tuples.

I was hoping for something more like a 'struct' which would be similar to a 'class' but is more light-weight (a struct would still be a reference but does NOT derive from Object but maybe something called Structure)  It could still have members but because it's a reference you could assign it to other struct references much faster than a Valhalla object.  The overhead of a full 'class' causes much of the 'bloat' in Java.  A leaner 'struct' I think would help reduce memory usage (no monitor or any virtual functions in the base class Structure).

Thanks,

Comments

Very good tutorial and explained to the point.. Great and useful quick reference..

veera2

Thanks for the nice article.  could  you pls explain  what is client and server in this context.

-Veera

Thamizharasu

Thanks for the nice article.  could  you pls explain  what is client and server in this context.

-Veera

Hi Veera2,

Thanks for your question. Client means the client code which will talk to the REST API. Server means the REST API which will produce result for the consumer.

I hope this will clarify your question.

Thanks,

Tham

Ajit Kumar Singh

Thanks for the nice article.

user8193082

nice!!, thanks

User_GIRQ8

Nice article. Could you please explain, how can we limit the number of requests originating from a same IP i.e "Rate Limiting" through Jersey to avoid flooding?@

1 - 6

Post Details

Added on Nov 19 2018
0 comments
273 views