You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Brian Lee <br...@hotmail.com> on 2004/08/06 01:51:16 UTC
NonSynchronizedStringBuffer [was Re: NonSynchronizedString]
Sorry about that. I'm a total moron, I meant NonSynchronizedStringBuffer.
It would basically be a copy and paste of the java.lang.StringBuffer class
without the synchronized modifiers on all the public methods. Of course this
would make the new FastStringBuffer non-threadsafe, but my applications
never share a StringBuffer between threads.
BAL
>From: Martin Cooper <mf...@gmail.com>
>To: Jakarta Commons Developers List <co...@jakarta.apache.org>
>Subject: Re: NonSynchronizedString
>Date: Thu, 5 Aug 2004 16:28:29 -0700
>
>On Thu, 05 Aug 2004 19:17:08 -0400, Brian Lee <br...@hotmail.com>
>wrote:
> > I was looking for a performance optimized non-synched String object for
>use
> > in some of my apps. It seems like a FastString or NonSynchronizedString
> > object would be pretty useful in the jakarta.lang package.
> >
> > I wanted to see if anyone else has had this need and how they got around
>it
> > and if it's a not-bad idea.
>
>I'm clearly missing something obvious here, but given that Strings are
>immutable, what is it that you need to synchronise?
>
>--
>Martin Cooper
>
>
> >
> > Thanks,
> > BAL
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: NonSynchronizedStringBuffer [was Re: NonSynchronizedString]
Posted by Craig McClanahan <cr...@gmail.com>.
Tiger (J2SE 5.0 nee 1.5) users don't need to wait for someone to
create such a class ... it's already included
(java.lang.StringBuilder). It might be nice to have such a class
available elsewhere for apps built on earlier JDKs.
Craig
On Thu, 05 Aug 2004 19:51:16 -0400, Brian Lee <br...@hotmail.com> wrote:
> Sorry about that. I'm a total moron, I meant NonSynchronizedStringBuffer.
>
> It would basically be a copy and paste of the java.lang.StringBuffer class
> without the synchronized modifiers on all the public methods. Of course this
> would make the new FastStringBuffer non-threadsafe, but my applications
> never share a StringBuffer between threads.
>
> BAL
>
> >From: Martin Cooper <mf...@gmail.com>
> >To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> >Subject: Re: NonSynchronizedString
> >Date: Thu, 5 Aug 2004 16:28:29 -0700
> >
> >On Thu, 05 Aug 2004 19:17:08 -0400, Brian Lee <br...@hotmail.com>
> >wrote:
> > > I was looking for a performance optimized non-synched String object for
> >use
> > > in some of my apps. It seems like a FastString or NonSynchronizedString
> > > object would be pretty useful in the jakarta.lang package.
> > >
> > > I wanted to see if anyone else has had this need and how they got around
> >it
> > > and if it's a not-bad idea.
> >
> >I'm clearly missing something obvious here, but given that Strings are
> >immutable, what is it that you need to synchronise?
> >
> >--
> >Martin Cooper
> >
> >
> > >
> > > Thanks,
> > > BAL
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > >
> > >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] NonSynchronizedStringBuffer [was Re: NonSynchronizedString]
Posted by Stephen Colebourne <sc...@btopenworld.com>.
Yes, StrBuilder would be the same as the java class. But that is one and the
same as FastStringBuilder ;-)
Stephen
----- Original Message -----
From: "Henri Yandell" <ba...@generationjava.com>
> JkStringBuilder or something; a direct copy of the JDK 1.5 javadoc but our
> own implementation?
>
> I'm far more comfortable with us making 1.5 API things available to 1.2+,
> than creating a new FastStringBuffer class. Seems a lot more useful.
>
> Hen
>
> On Fri, 6 Aug 2004, [iso-8859-1] Stephen Colebourne wrote:
>
> > JDK1.5 has StringBuilder to do this.
> >
> > But, commons lang is for earlier JDKs too.
> > There is a clear need for a class as you describe in
> > [lang] IMO. The author of the class however needs to
> > write it WITHOUT copying the JDK class, yet still make
> > it perform in the same way (for licence reasons).
> >
> > Stephen
> >
> >
> > --- Oliver Zeigermann <ol...@zeigermann.de> wrote:
> > > Isn't there something in JDK1.5 for that? How was it
> > > called?
> > >
> > > Oliver
> > >
> > > Brian Lee wrote:
> > > > Sorry about that. I'm a total moron, I meant
> > > NonSynchronizedStringBuffer.
> > > >
> > > > It would basically be a copy and paste of the
> > > java.lang.StringBuffer
> > > > class without the synchronized modifiers on all
> > > the public methods. Of
> > > > course this would make the new FastStringBuffer
> > > non-threadsafe, but my
> > > > applications never share a StringBuffer between
> > > threads.
> > > >
> > > > BAL
> > > >
> > > >> From: Martin Cooper <mf...@gmail.com>
> > > >> To: Jakarta Commons Developers List
> > > <co...@jakarta.apache.org>
> > > >> Subject: Re: NonSynchronizedString
> > > >> Date: Thu, 5 Aug 2004 16:28:29 -0700
> > > >>
> > > >> On Thu, 05 Aug 2004 19:17:08 -0400, Brian Lee
> > > >> <br...@hotmail.com> wrote:
> > > >> > I was looking for a performance optimized
> > > non-synched String object
> > > >> for use
> > > >> > in some of my apps. It seems like a FastString
> > > or NonSynchronizedString
> > > >> > object would be pretty useful in the
> > > jakarta.lang package.
> > > >> >
> > > >> > I wanted to see if anyone else has had this
> > > need and how they got
> > > >> around it
> > > >> > and if it's a not-bad idea.
> > > >>
> > > >> I'm clearly missing something obvious here, but
> > > given that Strings are
> > > >> immutable, what is it that you need to
> > > synchronise?
> > > >>
> > > >> --
> > > >> Martin Cooper
> > > >>
> > > >>
> > > >> >
> > > >> > Thanks,
> > > >> > BAL
> > > >> >
> > > >> >
> > >
> > ---------------------------------------------------------------------
> > > >> > To unsubscribe, e-mail:
> > > commons-dev-unsubscribe@jakarta.apache.org
> > > >> > For additional commands, e-mail:
> > > commons-dev-help@jakarta.apache.org
> > > >> >
> > > >> >
> > > >>
> > > >>
> > >
> > ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail:
> > > commons-dev-unsubscribe@jakarta.apache.org
> > > >> For additional commands, e-mail:
> > > commons-dev-help@jakarta.apache.org
> > > >>
> > > >
> > > >
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > commons-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > commons-dev-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > commons-dev-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] NonSynchronizedStringBuffer [was Re: NonSynchronizedString]
Posted by Henri Yandell <ba...@generationjava.com>.
Any reason not to do:
JkStringBuilder or something; a direct copy of the JDK 1.5 javadoc but our
own implementation?
I'm far more comfortable with us making 1.5 API things available to 1.2+,
than creating a new FastStringBuffer class. Seems a lot more useful.
Hen
On Fri, 6 Aug 2004, [iso-8859-1] Stephen Colebourne wrote:
> JDK1.5 has StringBuilder to do this.
>
> But, commons lang is for earlier JDKs too.
> There is a clear need for a class as you describe in
> [lang] IMO. The author of the class however needs to
> write it WITHOUT copying the JDK class, yet still make
> it perform in the same way (for licence reasons).
>
> Stephen
>
>
> --- Oliver Zeigermann <ol...@zeigermann.de> wrote:
> > Isn't there something in JDK1.5 for that? How was it
> > called?
> >
> > Oliver
> >
> > Brian Lee wrote:
> > > Sorry about that. I'm a total moron, I meant
> > NonSynchronizedStringBuffer.
> > >
> > > It would basically be a copy and paste of the
> > java.lang.StringBuffer
> > > class without the synchronized modifiers on all
> > the public methods. Of
> > > course this would make the new FastStringBuffer
> > non-threadsafe, but my
> > > applications never share a StringBuffer between
> > threads.
> > >
> > > BAL
> > >
> > >> From: Martin Cooper <mf...@gmail.com>
> > >> To: Jakarta Commons Developers List
> > <co...@jakarta.apache.org>
> > >> Subject: Re: NonSynchronizedString
> > >> Date: Thu, 5 Aug 2004 16:28:29 -0700
> > >>
> > >> On Thu, 05 Aug 2004 19:17:08 -0400, Brian Lee
> > >> <br...@hotmail.com> wrote:
> > >> > I was looking for a performance optimized
> > non-synched String object
> > >> for use
> > >> > in some of my apps. It seems like a FastString
> > or NonSynchronizedString
> > >> > object would be pretty useful in the
> > jakarta.lang package.
> > >> >
> > >> > I wanted to see if anyone else has had this
> > need and how they got
> > >> around it
> > >> > and if it's a not-bad idea.
> > >>
> > >> I'm clearly missing something obvious here, but
> > given that Strings are
> > >> immutable, what is it that you need to
> > synchronise?
> > >>
> > >> --
> > >> Martin Cooper
> > >>
> > >>
> > >> >
> > >> > Thanks,
> > >> > BAL
> > >> >
> > >> >
> >
> ---------------------------------------------------------------------
> > >> > To unsubscribe, e-mail:
> > commons-dev-unsubscribe@jakarta.apache.org
> > >> > For additional commands, e-mail:
> > commons-dev-help@jakarta.apache.org
> > >> >
> > >> >
> > >>
> > >>
> >
> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail:
> > commons-dev-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail:
> > commons-dev-help@jakarta.apache.org
> > >>
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > commons-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > commons-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] NonSynchronizedStringBuffer [was Re: NonSynchronizedString]
Posted by Stephen Colebourne <sc...@btopenworld.com>.
JDK1.5 has StringBuilder to do this.
But, commons lang is for earlier JDKs too.
There is a clear need for a class as you describe in
[lang] IMO. The author of the class however needs to
write it WITHOUT copying the JDK class, yet still make
it perform in the same way (for licence reasons).
Stephen
--- Oliver Zeigermann <ol...@zeigermann.de> wrote:
> Isn't there something in JDK1.5 for that? How was it
> called?
>
> Oliver
>
> Brian Lee wrote:
> > Sorry about that. I'm a total moron, I meant
> NonSynchronizedStringBuffer.
> >
> > It would basically be a copy and paste of the
> java.lang.StringBuffer
> > class without the synchronized modifiers on all
> the public methods. Of
> > course this would make the new FastStringBuffer
> non-threadsafe, but my
> > applications never share a StringBuffer between
> threads.
> >
> > BAL
> >
> >> From: Martin Cooper <mf...@gmail.com>
> >> To: Jakarta Commons Developers List
> <co...@jakarta.apache.org>
> >> Subject: Re: NonSynchronizedString
> >> Date: Thu, 5 Aug 2004 16:28:29 -0700
> >>
> >> On Thu, 05 Aug 2004 19:17:08 -0400, Brian Lee
> >> <br...@hotmail.com> wrote:
> >> > I was looking for a performance optimized
> non-synched String object
> >> for use
> >> > in some of my apps. It seems like a FastString
> or NonSynchronizedString
> >> > object would be pretty useful in the
> jakarta.lang package.
> >> >
> >> > I wanted to see if anyone else has had this
> need and how they got
> >> around it
> >> > and if it's a not-bad idea.
> >>
> >> I'm clearly missing something obvious here, but
> given that Strings are
> >> immutable, what is it that you need to
> synchronise?
> >>
> >> --
> >> Martin Cooper
> >>
> >>
> >> >
> >> > Thanks,
> >> > BAL
> >> >
> >> >
>
---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> >> >
> >> >
> >>
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> >>
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> >
> >
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: NonSynchronizedStringBuffer [was Re: NonSynchronizedString]
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Isn't there something in JDK1.5 for that? How was it called?
Oliver
Brian Lee wrote:
> Sorry about that. I'm a total moron, I meant NonSynchronizedStringBuffer.
>
> It would basically be a copy and paste of the java.lang.StringBuffer
> class without the synchronized modifiers on all the public methods. Of
> course this would make the new FastStringBuffer non-threadsafe, but my
> applications never share a StringBuffer between threads.
>
> BAL
>
>> From: Martin Cooper <mf...@gmail.com>
>> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
>> Subject: Re: NonSynchronizedString
>> Date: Thu, 5 Aug 2004 16:28:29 -0700
>>
>> On Thu, 05 Aug 2004 19:17:08 -0400, Brian Lee
>> <br...@hotmail.com> wrote:
>> > I was looking for a performance optimized non-synched String object
>> for use
>> > in some of my apps. It seems like a FastString or NonSynchronizedString
>> > object would be pretty useful in the jakarta.lang package.
>> >
>> > I wanted to see if anyone else has had this need and how they got
>> around it
>> > and if it's a not-bad idea.
>>
>> I'm clearly missing something obvious here, but given that Strings are
>> immutable, what is it that you need to synchronise?
>>
>> --
>> Martin Cooper
>>
>>
>> >
>> > Thanks,
>> > BAL
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org