Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-2281 Initial Embedded and Hot Rod compatibility #1790

Closed
wants to merge 7 commits into from

Conversation

galderz
Copy link
Member

@galderz galderz commented Apr 25, 2013

It contains:

  • Add first version of embedded <-> hotrod compatibility with a type converter interface and and an interceptor that uses it
  • Allow objects such as byte arrays to be used as both keys and values
  • Add ability to pass in metadata when storing data into the cache, hence removing the need for a wrapper for Hot Rod values
  • Convert Hot Rod to use byte array keys and values (reducing memory consumption)
  • This involves creating equivalent concurrent and non-concurrent collections
  • Update CHMv8 base class from where the equivalent version was created
  • Try to use a make sure all keys and values, when logged, are logged via a util that checks if it's a byte array.

Please note that some Memcached tests are failing because I don't yet have a putIfAbsent method that takes a metadata object. I'll get that sorted tomorrow morning and add a commit to fix it.

In the mean time, please review this so that it can get into the next alpha :)

@galderz
Copy link
Member Author

galderz commented Apr 26, 2013

Just added a commit to add a putIfAbsent call with Metadata so that Memcached tests pass. It all looks good now testing wise.


// AdvancedCache<K, V> withMetadata(Metadata metadata);

V put(K key, V value, Metadata metadata);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadocs?

@galderz
Copy link
Member Author

galderz commented Apr 26, 2013

@maniksurtani Added javadoc

@galderz
Copy link
Member Author

galderz commented Apr 26, 2013

@tristantarrant Removed commented code and updated XSD

@tristantarrant
Copy link
Member

Looks good to me.

@galderz
Copy link
Member Author

galderz commented Apr 29, 2013

Removed public from metadata interface. I'm also checking the testsuite failures now...

@galderz
Copy link
Member Author

galderz commented Apr 29, 2013

Don't merge this guys, the failing tests are showing some logic is missing to deal with the fact that CHMv8 can be serialized. I'm checking to see what the implications are on Equivalence interface.

@galderz
Copy link
Member Author

galderz commented Apr 30, 2013

Guys, the testsuite stuff has been fixed. I don't think the remaining failures are related to the commits.

@galderz
Copy link
Member Author

galderz commented Apr 30, 2013

Oh, one sec, the xsite failures are new... and are not run by default when running core/... so they might be related... i'll investigate...

@galderz
Copy link
Member Author

galderz commented Apr 30, 2013

Oh, one sec, seems like some of these xsite and tree failures are already in master, see http://54.235.219.66/viewLog.html?buildId=906&buildTypeId=bt9 vs http://54.235.219.66/viewLog.html?buildId=925&tab=buildResultsDiv&buildTypeId=bt2

Nothing to be fixed then at least as far as this pull req is concerned.

* Added revision numbers for each class so that they can be compared
with the CVS repository and see if any update happened since last
time they were updated.
* Comparing function classes for key/values can now be defined via
XML or programmatic configurations.
* If any Comparing functions given, either ComparingCHMv8 or
BoundedCHM taking Comparing function(s) are used.
* Added EquivalentHashSet and EquivalentHashMap collections to support
byte[] key types in invocation contexts.
* Refactored ConcurrentMapFactory to a CollectionFactory that can
create not only concurrent maps, but maps and sets, based on
equivalence configuration.
* AdvancedCache adds a couple of new methods that take metadata
as parameter. This can be used by users to provide version, and
also for server implementations to add their own metadata (i.e.
REST servers and MIME data).
* The implementation of these methods is temporary and is bound
to change in order to feed the metadata object all the way to
the cache entry.
* There's an initial stab at the compatibility testing with
initial focus on Embedded and Hot Rod server. Tests here are not
yet working.
@galderz
Copy link
Member Author

galderz commented May 1, 2013

Rebased.

import java.io.Serializable;

/**
* An interface that allows custom implementations for objects are comparable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...for objects that are comparable...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed now.

import static org.testng.AssertJUnit.*;

/**
* // TODO: Document this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todos

* Remove CHMv8 and leave only the equivalent version
* Add putIfAbsent with Metadata so that Memcached tests pass
* Add javadocs for Metadata related additions
* Update configuration XSD and remove commented code
* Make Equivalence extend Serializable and fix tests
* Remove commented code sections
* Add missing javadocs
@galderz
Copy link
Member Author

galderz commented May 1, 2013

Updated the last commit based on comments. This should be ready now.

@mmarkus
Copy link
Contributor

mmarkus commented May 2, 2013

@galderz I'll leave the JIRA opened as there are still some things to do.

@mmarkus mmarkus closed this May 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants