public class SessionResourceVariantByteStore extends ResourceVariantByteStore
ResourceVariantByteStore that caches the variant bytes in memory
and does not persist them over workbench invocations.
This class is not intended to be subclassed by clients.
| Constructor and Description |
|---|
SessionResourceVariantByteStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteBytes(IResource resource)
Method called to indicate that it is known that there is no variant associated
with the local resource.
|
void |
dispose()
Dispose of any cached sync bytes when this cache is no longer needed.
|
boolean |
flushBytes(IResource resource,
int depth)
Remove the bytes from the tree for the resource variants corresponding to the
given local resource and its descendants to the given depth.
|
byte[] |
getBytes(IResource resource)
Return the bytes for the variant corresponding the given local resource.
|
boolean |
isEmpty()
Return
true if no bytes are contained in this tree. |
IResource[] |
members(IResource resource)
Return the children of the given resource that have resource variants in this tree.
|
boolean |
setBytes(IResource resource,
byte[] bytes)
Set the bytes for the variant corresponding the given local resource.
|
equals, runpublic boolean deleteBytes(IResource resource) throws TeamException
ResourceVariantByteStoreflush(IResource, int) method should be used in the cases
where a client wishes to remove bytes for other reason.deleteBytes in class ResourceVariantByteStoreresource - the local resourcetrue if this changes the bytes for the variantTeamExceptionpublic void dispose()
ResourceVariantByteStoredispose in class ResourceVariantByteStorepublic boolean flushBytes(IResource resource, int depth) throws TeamException
ResourceVariantByteStoregetBytes(resource) will
return null for the affected resources.flushBytes in class ResourceVariantByteStoreresource - the local resourcedepth - the depth of the operation (one of IResource.DEPTH_ZERO,
IResource.DEPTH_ONE, or IResource.DEPTH_INFINITE)true if there were bytes present which were removedTeamExceptionpublic byte[] getBytes(IResource resource) throws TeamException
ResourceVariantByteStorenull means that no bytes have been stored
for the resource variant. It is up to the client to determine whether
this means that the resource variant does not exist or that it has not been
fetched or otherwise determined yet.getBytes in class ResourceVariantByteStoreresource - the local resourceTeamExceptionpublic boolean isEmpty()
true if no bytes are contained in this tree.true if no bytes are contained in this tree.public IResource[] members(IResource resource)
ResourceVariantByteStoremembers in class ResourceVariantByteStoreresource - the parent resourcepublic boolean setBytes(IResource resource, byte[] bytes) throws TeamException
ResourceVariantByteStorenull. If it is known that the remote
does not exist, deleteBytes(IResource) should be used instead.
If the sync bytes for the remote are stale and should be removed,
flushBytes(IResouce, int) should be called.setBytes in class ResourceVariantByteStoreresource - the local resourcebytes - the bytes that represent the resource's varianttrue if the bytes changedTeamExceptionGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.