From jbosscache-commits at lists.jboss.org Fri Aug 1 04:39:16 2008 Content-Type: multipart/mixed; boundary="===============2354856217154713006==" MIME-Version: 1.0 From: jbosscache-commits at lists.jboss.org To: jbosscache-commits at lists.jboss.org Subject: [jbosscache-commits] JBoss Cache SVN: r6477 - core/trunk/src/main/java/org/jboss/cache/commands. Date: Fri, 01 Aug 2008 04:39:16 -0400 Message-ID: --===============2354856217154713006== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: manik.surtani(a)jboss.com Date: 2008-08-01 04:39:15 -0400 (Fri, 01 Aug 2008) New Revision: 6477 Modified: core/trunk/src/main/java/org/jboss/cache/commands/OptimisticCommandsFact= oryImpl.java core/trunk/src/main/java/org/jboss/cache/commands/PessimisticCommandsFac= toryImpl.java Log: added createNodeCommand for opt locking deprecated opt commands factory Modified: core/trunk/src/main/java/org/jboss/cache/commands/OptimisticComma= ndsFactoryImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/src/main/java/org/jboss/cache/commands/OptimisticCommandsFac= toryImpl.java 2008-07-31 18:08:14 UTC (rev 6476) +++ core/trunk/src/main/java/org/jboss/cache/commands/OptimisticCommandsFac= toryImpl.java 2008-08-01 08:39:15 UTC (rev 6477) @@ -2,6 +2,7 @@ = import org.jboss.cache.Fqn; import org.jboss.cache.commands.legacy.read.LegacyGravitateDataCommand; +import org.jboss.cache.commands.legacy.write.CreateNodeCommand; import org.jboss.cache.commands.legacy.write.LegacyEvictCommand; import org.jboss.cache.commands.legacy.write.VersionedInvalidateCommand; import org.jboss.cache.commands.read.GravitateDataCommand; @@ -13,7 +14,10 @@ * * @author Manik Surtani (manik(a)jbo= ss.org) * @since 3.0 + * @deprecated will be removed with opt locking */ +(a)Deprecated +(a)SuppressWarnings("deprecation") public class OptimisticCommandsFactoryImpl extends CommandsFactoryImpl { @Override @@ -42,12 +46,28 @@ } = @Override + public CreateNodeCommand buildCreateNodeCommand(Fqn fqn) + { + CreateNodeCommand command =3D new CreateNodeCommand(fqn); + command.initialize(dataContainer); + return command; + } + + + @Override public ReplicableCommand fromStream(int id, Object[] parameters) { ReplicableCommand command; boolean skipSetParams =3D false; switch (id) { + case CreateNodeCommand.METHOD_ID: + { + CreateNodeCommand returnValue =3D new CreateNodeCommand(null); + returnValue.initialize(dataContainer); + command =3D returnValue; + break; + } case GravitateDataCommand.METHOD_ID: { LegacyGravitateDataCommand returnValue =3D new LegacyGravitate= DataCommand(rpcManager.getLocalAddress()); Modified: core/trunk/src/main/java/org/jboss/cache/commands/PessimisticComm= andsFactoryImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/trunk/src/main/java/org/jboss/cache/commands/PessimisticCommandsFa= ctoryImpl.java 2008-07-31 18:08:14 UTC (rev 6476) +++ core/trunk/src/main/java/org/jboss/cache/commands/PessimisticCommandsFa= ctoryImpl.java 2008-08-01 08:39:15 UTC (rev 6477) @@ -2,7 +2,6 @@ = import org.jboss.cache.Fqn; import org.jboss.cache.commands.legacy.read.PessGetChildrenNamesCommand; -import org.jboss.cache.commands.legacy.write.CreateNodeCommand; import org.jboss.cache.commands.legacy.write.PessClearDataCommand; import org.jboss.cache.commands.legacy.write.PessMoveCommand; import org.jboss.cache.commands.legacy.write.PessPutDataMapCommand; @@ -30,7 +29,10 @@ * @author Manik Surtani (manik(a)jbo= ss.org) * @see org.jboss.cache.commands.legacy.ReversibleCommand * @since 3.0 + * @deprecated will be removed with possimistic locking */ +(a)Deprecated +(a)SuppressWarnings("deprecation") public class PessimisticCommandsFactoryImpl extends OptimisticCommandsFact= oryImpl { @Override @@ -98,14 +100,6 @@ } = @Override - public CreateNodeCommand buildCreateNodeCommand(Fqn fqn) - { - CreateNodeCommand command =3D new CreateNodeCommand(fqn); - command.initialize(dataContainer); - return command; - } - - @Override public InvalidateCommand buildInvalidateCommand(Fqn fqn) { InvalidateCommand command =3D new InvalidateCommand(fqn); @@ -185,13 +179,6 @@ command =3D returnValue; break; } - case CreateNodeCommand.METHOD_ID: - { - CreateNodeCommand returnValue =3D new CreateNodeCommand(null); - returnValue.initialize(dataContainer); - command =3D returnValue; - break; - } case InvalidateCommand.METHOD_ID: { InvalidateCommand returnValue =3D new InvalidateCommand(null); --===============2354856217154713006==--